Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open Database & Recordset 1

Status
Not open for further replies.

Fursten

Programmer
Dec 27, 2000
403
PT
Hi,

I was wondering if it is possible to work with a recordset after make a disconnect from the database.

For instance, I got and recordset from SQLServer. Because I already have it on my machine, I thought I should be able to make: rsDataBase.ActiveConnection = Close. This way I would free my Database, as I already have the recordset needed. Despite that, I should be able to work with the recordset, right?

For trying this, I got a recordset, and make it the datasource of my grid. This way the grid showed my records. After that I closed the database and my grid lost is records...

It seems that, if I close the database connection, I kill the recordset object, too, is that right?

Thank you :)
 
Create the recordset using client-side cursor.
Populate as usual.
Set the ActiveConnection property of the recordset to Nothing.
Close the Connection object

Viola! :)

Good Luck!
-Mats Hulten
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top