This doesn't have much to do with the project actually, at a quick look the
code looks like you're not instantiating as many commands and readers as
you would need, but you may want to get a batch of ids from the DB perhaps
rather than one at a time.

On Mon, Jul 23, 2012 at 3:14 PM, Alvaro Alberto Silva Lopes Filho <
[email protected]> wrote:

> Yes, but what kind of operation I can use to proceed an input query from
> data base and manage Rows to add new column row["ID"] recieving a value
> from query ?
>
> like this
> cmd = "Select MySequence.NEXTVAL from DUAL"
>
> execute this and set
>
> row["ID"] = reader["ID"];
>
> I try to use AbstractCommandOperation. but i had problems with connections
> closed.
>
> this is how a tried to do...
>
>     public override IEnumerable<Row> Execute(IEnumerable<Row> rows)
>         {
>             using (Connection)
>             {
>                 using (Command)
>                 {
>                     foreach (var row in rows)
>                     {
>                         Command.CommandText = string.Format("SELECT
> Sequence.NEXTVAL as ID FROM DUAL");
>
>                         using (Reader)
>                         {
>                             while (Reader.Read())
>                             {
>                                 row["ID"] = reader["ID"];
>                                 yield return row;
>                             }
>                         }
>                     }
>                 }
>             }
>         }
>
> Thank's again
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Rhino Tools Dev" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/rhino-tools-dev/-/8xyl6E6yZ3AJ.
>
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/rhino-tools-dev?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Rhino Tools Dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rhino-tools-dev?hl=en.

Reply via email to