G
Guest
Hello,
I have two different, but related questions.
1) In .net or ADO is there a way to make an insert by just passing new
parameters to string. I am doing multiple inserts where the only difference
is values being inserted. In unmanged code I could use sprintf to have my
insert command with parameters I need to substitute. For each insert command
there are 9 parameters. Currently the only way I could figure to do it is to
use StringBuilder and Append each piece seperately, this seems wasteful,
since need to create a new
Stringbuilder object for each insert and build it from scratch.
2)Is there a way to buffer updates with where clauses so that you only need
to issue only on execute command instead of issuing them one at a time. I am
using ADO .net. In other programing environments I could buffer the commands
such that each element in an array represents a specific update. The updates
are the same except for the where clause parameters and actual data being
updated. I did this in oracle proc using cursors, but don't know how to
handle it in ADO .net.
Thanks
Brian
I have two different, but related questions.
1) In .net or ADO is there a way to make an insert by just passing new
parameters to string. I am doing multiple inserts where the only difference
is values being inserted. In unmanged code I could use sprintf to have my
insert command with parameters I need to substitute. For each insert command
there are 9 parameters. Currently the only way I could figure to do it is to
use StringBuilder and Append each piece seperately, this seems wasteful,
since need to create a new
Stringbuilder object for each insert and build it from scratch.
2)Is there a way to buffer updates with where clauses so that you only need
to issue only on execute command instead of issuing them one at a time. I am
using ADO .net. In other programing environments I could buffer the commands
such that each element in an array represents a specific update. The updates
are the same except for the where clause parameters and actual data being
updated. I did this in oracle proc using cursors, but don't know how to
handle it in ADO .net.
Thanks
Brian