Re: Error when Reusing ADO Connection & Command

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



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"


.



Relevant Pages

  • Re: "continue" in ASP
    ... Thomas Scheiderich wrote: ... The only way to to skip code in a loop and start the next loop is ... Do you have the vbscript documentation? ... This email account is my spam trap so I ...
    (microsoft.public.scripting.vbscript)
  • Re: OT - Breast exposure?
    ... she *made* the loop end of July. ... Is this a fashion statement? ... breasts, I can understand, but the normal women are ... also wearing those revealing tops and showing breast cleavage. ...
    (alt.support.stop-smoking)
  • Re: Arrcade cab
    ... maybe I should dedicate it to showing a constant ... loop of Singing in the Rain? ...
    (uk.rec.sheds)
  • Re: Updating listview control items one by one
    ... individual items and only the ones that are showing on the screen. ... I am using a loop to process ... withour having to refresh all the items? ...
    (microsoft.public.vc.mfc)
  • Re: renaming function result object inside loop
    ... each declare block creates a new scope level. ... Showing more of ... the code (like the portion of the loop using "Line") would be useful ...
    (comp.lang.ada)