I used ADOX to create an Access DataBase as per your code. However, I want
to immediately delete the DataBase if it fails to do somethings. However,
the delete fails saying the file is in use by another process. This appears
to be because when ADOX created the DataBase, it won't relesae it. How can
I get ADOX catalog to release the file? Following is the code:
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
fi.Delete 'Gives error here saying file is in use by another
process
catch
end try
"Veign" wrote:
>
>
> --
> Chris Hanscom - Microsoft MVP (VB)
> Veign's Resource Center
> http://www.veign.com/vrc_main.asp
> --
>
> "dan" <dan DeleteThis @discussions.microsoft.com> wrote in message
> news:395E5D07-5D93-4863-8A2A-D689082AFF18@microsoft.com...
> > Hi,
> >
> > Looking for some ideas ? ADO / RDO ?
> > I need to develope a visual basic application that when a user launches
> the
> > application it checks to see if the datase for the user is created if the
> > user does not have a DATABASE it creates one then creates a table in the
> > Access Database.
> >
> >
>
>
> >> Stay informed about: Create Database