Click to See Complete Forum and Search --> : ADO Commands


chris_boebel
August 13th, 1999, 08:12 AM
Greetings -

I have a parameterized ADO command. For this project, the command is part of a data environment that I set up.

I'm having a problem re-running the command with a new parameter. The first time I run it, no problem. The second time I run it (with a new parameter), I get an error along the lines of "this action cannot be completed with an object that's already open." Question is - how do I close it?

Here's the syntax:

envDJ.cmdGetOneStudent(temp_id)




Thanks in advance.

Lothar Haensler
August 16th, 1999, 07:04 AM
if your command returns a result set, you should close that after reading all the rows.
envDJ.cmdGetOneStudent
do while not envDJ.rscmdGetOneStudent
...
Loop
envDJ.rscmd...close

johnk
August 16th, 1999, 08:10 AM
Try setting command=nothing.

John Kisner