Re: Error when Reusing ADO Connection & Command
- From: "Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx>
- Date: Tue, 24 Oct 2006 06:10:12 -0400
MarketWizard wrote:
Hello,
I have a loop where I am iterating through a list of values that I
assign to a parameter, then perform an execute. It works the first
time thru the loop, but fails with a 'missing expression' error the
second pass. I checked the command and recordset variables, and they
look ok. Here is my code: A solution wins you a prize, please help
ASAP.
We obviously cannot run your code to debug it ourselves, so you are going to
have to help us by showing us which line of code generates the error, as
well as showing us the values of all the variables that are relevant to that
line.
It might help to close the recordset after the CopyFromRecordset line.
Set Rs2 = cmd2.execute--
Ws.Range("A2").CopyFromRecordset Rs2
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
.
- References:
- Error when Reusing ADO Connection & Command
- From: MarketWizard
- Error when Reusing ADO Connection & Command
- Prev by Date: Re: determine whether a field is identity column
- Next by Date: Re: Error when Reusing ADO Connection & Command
- Previous by thread: Error when Reusing ADO Connection & Command
- Next by thread: Re: Error when Reusing ADO Connection & Command
- Index(es):
Relevant Pages
|