Re: Error when Reusing ADO Connection & Command
- From: "Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx>
- Date: Tue, 24 Oct 2006 08:38:42 -0400
MarketWizard wrote:
Hello,I'm not sure it has anything to do with your error, but this:
it fails on the execute command within the body of the loop.
the main question is: how can you re-use a command within the body of
a loop, where with each iteration, the parameters to the stored
procedure change. I am calling a stored procedure which returns a
ref cursor. How should I re-use the connection, command, recordset?
I have tried to move the creation&closing of these within the loop,
and received the same 'missing expression' error.
any idea on best practices on this? and what may be invalidating my
command (which is what I suspect is going on) thanks much in advance
cmd2.ActiveConnection = cn
should be:
Set cmd2.ActiveConnection = cn
--
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.
.
- References:
- Error when Reusing ADO Connection & Command
- From: MarketWizard
- Re: Error when Reusing ADO Connection & Command
- From: Bob Barrows [MVP]
- Error when Reusing ADO Connection & Command
- Prev by Date: Re: Error when Reusing ADO Connection & Command
- Next by Date: Re: Error when Reusing ADO Connection & Command
- Previous by thread: Re: Error when Reusing ADO Connection & Command
- Next by thread: Re: Error when Reusing ADO Connection & Command
- Index(es):
Relevant Pages
|