Hi
When I create a new database in .net using ADOX a locking record file is created how do you close the locking file. The code below is only a test and you would not do this normally. If you create the database and set the CatDB to nothing the locking file remains open. If you try and kill the database you get the error that the database is being used by another process. Can anybody help me.
:confused: Kind Regards
Dim strProjectLocation As String
Dim CatDB As ADOX.Catalog = New ADOX.Catalog
Dim sDatabasename As String = "L:\TestDatabase\Test1.mdb"
Try
strProjectLocation = "Provider=Microsoft.Jet.OLEDB.4.0"
strProjectLocation &= ";Data Source=" & sDatabasename & ""
strProjectLocation &= ";Jet OLEDB:Engine Type=5"
If File.Exists(sDatabasename) Then
Kill(sDatabasename)
End If
CatDB.Create(strProjectLocation)
Catch ex As Exception
MessageBox.Show("Unexpected Error " & ex.Message)
Finally
CatDB = Nothing
End Try