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!

Can anyone help solve my ado data control problem? 1

Status
Not open for further replies.

parasite

Programmer
Sep 4, 2002
4
0
0
GB
I am using ado data controls to link to an access database, but am unable to subsequently close the database connections to enable a database compacting routine to work.
I need to compact the database at the end of the session, and this is proving a challenge. I have been searching for ways that this could be achieved for the last day now, and am hoping that I wont have to re-write my application without the ado data controls. When the compacting routine runs, an error message is generated that Admin is currently using the database. Does anyone know how to release an ado data control connection(s)?
 
datPrimaryRS.Recordset.Close [/b][/i][/u]*******************************************************[sub]
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
 
I am now in your debt CCLINT.
I didnt realise the extra level of nested properties. An extra line completes the puzzle:

datPrimaryRS.recordset.ActiveConnection = Nothing

[I was just explaining how we would probably have to rewrite our system without ADO data controls when your reply arrived.]

Thank you very much,
Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top