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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Free resources on ADODC?

Status
Not open for further replies.

custsoft

Programmer
Aug 29, 2000
41
0
0
I use a recordset created by using an ADODC. The problem I am having is that when I try to set the recordset to nothing to release all of its' resources from memory, I get an error "data source name not found and no default driver specified". If I create the recordset in code I can set the recordset to nothing. How to I free the resources on an ADODC recordset?
 
Try this

Adodc1.Recordset.Close
Set Adodc1.Recordset.ActiveConnection = Nothing

works for me...Good Luck
 
Setting the ActiveConnection property to nothing is either going to give you (depending on your cursor type and location) a disconnected recordset or make your unavailable.

Are you doing this:

Set Datacontroller.Recordset = Nothing

It works on my machine.
 
Hi bjd4jc,
The above works if you have defined the recordset in code using set x = new adodb recordset. But I made the mistake, apparently, of using the ADO data control. It seems when I use the data control versus creating the recordset in code I get the error mentioned in my initial post when I try to set recordset to nothing. Why the data control works differently, is beyond me. Thanks for your help. Joe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top