Hi All

I have an application that only queries (no updates) a database using ADOCE.
I'm having a problem that even though I close the Recordsets and the
Connection to the database, I can't rename or delete the .cdb file until I
exit the application.

Anybody ever experienced something like this ?

Thanks in advance
Tom

Re: Access Denied when Deleting Pocket Access Database by Girish

Girish
Mon Jan 19 23:00:15 CST 2004

Hi,

I have experienced the same situation with SQLCE database. I thought the
problem might be with the memory leak which happens when u instantiate and
destroy COM objects.

Hope this helps..

Girish.
"Thomaz" <tkoberleNOSPAM@hotmail.com> wrote in message
news:O6MPDPv3DHA.2428@tk2msftngp13.phx.gbl...
> Hi All
>
> I have an application that only queries (no updates) a database using
ADOCE.
> I'm having a problem that even though I close the Recordsets and the
> Connection to the database, I can't rename or delete the .cdb file until I
> exit the application.
>
> Anybody ever experienced something like this ?
>
> Thanks in advance
> Tom
>
>
>
>



Re: Access Denied when Deleting Pocket Access Database by Ben

Ben
Tue Jan 20 03:00:41 CST 2004

I get this with low-level CE databases on 2003. Even after calling
CeUnmountDBVol(), which should release all control of the file, I get a
Sharing Violation if I try to delete it.

This problem seems to occur more on 2003 than 2002.

Ben.

Thomaz wrote:

> Hi All
>
> I have an application that only queries (no updates) a database using ADOCE.
> I'm having a problem that even though I close the Recordsets and the
> Connection to the database, I can't rename or delete the .cdb file until I
> exit the application.
>
> Anybody ever experienced something like this ?
>
> Thanks in advance
> Tom
>
>
>
>

Re: Access Denied when Deleting Pocket Access Database by paulnewton44

paulnewton44
Wed Jan 21 03:44:39 CST 2004

What method are you using to delete the database?

I use the Kill method of the FileSystem object and this works fine..

e.g. in eVB...

<snippet>
' close any open Rs's connected to the db
If gYourRecordSet.State = adStateOpen Then gYourRecordSet.Close

' destroy the Rs objects
' (you cannot actually destroy objects in eVB but I like to write it
anyway!)
Set gYourRecordSet = Nothing

' close db connection and kill
If gYourConnection.State = adStateOpen Then gYourConnection.Close

Set gYourConnection = Nothing
YourFSO.Kill ("YourDbFileName")
</snippet>

This is taken from a working module, so I know it works, if it doesn't
for you then check that the recordsets are not bound to any controls.

Hope this helps..

Paul Newton




"Thomaz" <tkoberleNOSPAM@hotmail.com> wrote in message news:<O6MPDPv3DHA.2428@tk2msftngp13.phx.gbl>...
> Hi All
>
> I have an application that only queries (no updates) a database using ADOCE.
> I'm having a problem that even though I close the Recordsets and the
> Connection to the database, I can't rename or delete the .cdb file until I
> exit the application.
>
> Anybody ever experienced something like this ?
>
> Thanks in advance
> Tom