Re: Command object and batching stored procedure calls
- From: "Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx>
- Date: Tue, 19 Feb 2008 10:07:15 -0500
Michael Viking wrote:
Greetings,
I've tried searching online for what I think must be easy to do, but
so far no luck. I have to call a stored procedure over and over as
data comes in. I'd like to queue the calls up on the client side and
send them in one batch to avoid all the network traffic but I can't
figure out how.
That's because there is no way without using dynamic sql to concatenate
all the procedure calls into a single string
sql="exec proc 'parm1';...;exec proc 'parmN'"
cmd.commandtype=adCmdText
cmd.commandtext = sql
cmd.execute ,,adExecuteNoRecords
Of course, doing so loses the value provided by using parameters:
security, strong datatyping, etc. Also, not all dbrms support batched
calls.
I'm not sure what you think you would be gaining by batching the
statements up. Session pooling should guarantee connection re-use if you
are worried about spawning too many connections.
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
.
- Follow-Ups:
- Re: Command object and batching stored procedure calls
- From: Michael Viking
- Re: Command object and batching stored procedure calls
- References:
- Command object and batching stored procedure calls
- From: Michael Viking
- Command object and batching stored procedure calls
- Prev by Date: Command object and batching stored procedure calls
- Next by Date: Could not update; currently locked error
- Previous by thread: Command object and batching stored procedure calls
- Next by thread: Re: Command object and batching stored procedure calls
- Index(es):
Relevant Pages
|
Loading