J
Jerry Spence1
I am creating a database as so:
Dim cat As New ADOX.Catalog()
Dim CurDB as String
Dim sCreateString As String
CurDB = "MyDatabase.mdb"
sCreateString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & CurDB
cat.Create(sCreateString)
cat = Nothing
The problem is that I wish to delete this database after copying it to
another folder. I can't because it says there is a sharing violation. It
also creates MyDatabase.ldb and this doesn't go even after I have set cat =
nothing. As soon as I stop my program, it frees it up and deletes the .ldb
file.
What do I have to do to close the database so I can delete it?
-Jerry
Dim cat As New ADOX.Catalog()
Dim CurDB as String
Dim sCreateString As String
CurDB = "MyDatabase.mdb"
sCreateString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & CurDB
cat.Create(sCreateString)
cat = Nothing
The problem is that I wish to delete this database after copying it to
another folder. I can't because it says there is a sharing violation. It
also creates MyDatabase.ldb and this doesn't go even after I have set cat =
nothing. As soon as I stop my program, it frees it up and deletes the .ldb
file.
What do I have to do to close the database so I can delete it?
-Jerry