I create a database file using ADOX Catalog. However, I want to later delete
the file but I get an error message that the database is being used by
another process. I have even tried creating the database then deleting it
immediately after with no other manipulations of creating tables, etc. It
seems that the ADOX catalog create method does not release the file. I've
even tried setting it to nothing but still it holds it in it's process. How
do I release the file?
Dim catNewDB As New ADOX.Catalog
Dim fi As New IO.FileInfo(DBName)
Try
If fi.Exists Then
fi.Delete()
End If
catNewDB.Create("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & DBName)
catNewDB = Nothing
catch
end try
dim fi as new IO.FileInfo(DBName)
fi.Delete 'get error here saying that another process using the file.
--
Dennis in Houston