469,327 Members | 1,238 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,327 developers. It's quick & easy.

ADODC closing connection

2
I have an ADODC object in my form which populates a datagrid.

I set the coonection string for ADODC at design time.

The problem is that I have no way to close the connection when i exit the application.

The lock file which the connection creates persists even after I exit.

This is what I write in form_unload:

Set Adodc1.Recordset = Nothing
Adodc1.ConnectionString = ""
Jun 28 '06 #1
1 8097
This may have been overlooked in your post but did you close the recordset and the connection before setting to nothing, ie;
Adodc1.recordset.close
set adodc1.recordset = nothing
adodc1.close (if adodc1 is your connection object)
set adodc1 = nothing

Al


I have an ADODC object in my form which populates a datagrid.

I set the coonection string for ADODC at design time.

The problem is that I have no way to close the connection when i exit the application.

The lock file which the connection creates persists even after I exit.

This is what I write in form_unload:

Set Adodc1.Recordset = Nothing
Adodc1.ConnectionString = ""
Jun 28 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

7 posts views Thread by Tumurbaatar S. | last post: by
4 posts views Thread by Raoul Watson | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by listenups61195 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.