Creating and Deleteing Access DataBase
From: Dennis (Dennis_at_discussions.microsoft.com)
Date: 03/18/05
- Next message: Dennis: "Re: ADOX/ADO quirk when creating a primary key"
- Previous message: Stephen Howe: "Re: Controlar el AddNew cuando se desconecta de la Red."
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 17 Mar 2005 16:57:04 -0800
In VB.Net, 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
- Next message: Dennis: "Re: ADOX/ADO quirk when creating a primary key"
- Previous message: Stephen Howe: "Re: Controlar el AddNew cuando se desconecta de la Red."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|