|
-
Aug 7th, 2001, 12:34 AM
#1
Disconnected Recordsets/Command
Hi,
I am attempting to use a disconnected recordset with a command object. I wish to:
Create a Connection object, and set it to open.
Bind the Connection object to the ActiveConnection property on a Command object.
Create a recordset and set it to the cursor returned by the Command object's Execute method.
I want the recordset to be disconnected, so I wish to close the
connection and pass the recordset back to another function.
However, when the connection's Close method is called, the recordset cannot work properly. I would set the CursorLocation property on the Recordset first, but it is instantiated by the execute method.
Does anyone have any ideas on obtaining a disconnected recordset with a command object?
Cheers,
TFA
-
Aug 7th, 2001, 03:19 AM
#2
Black Cat
Create the recordset, command, and connection objects. Use the connection as the command's activeconnection. Don't create the rs by command.execute - create a new one, set the cursor location to client, and call the rs's open method, passing the command as the first argument, leave out the connection argument, and set the lock and cursor to what you want. Then set the rs's activeconnection to nothing to disconnect it.
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|