Click here to Skip to main content
15,669,526 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I've been working on a system that runs across multiple workstations, the server creates an access database that is processed by remote systems.

I have the database/table creation working, problem comes when the creation is complete, the server keeps the database opened which means the database can't be moved to the remote system.

Below is test code that will reproduce the same issue.
Dim Database As String = "C:\Database.mdb"
        If File.Exists(Database) Then File.Delete(Database)
        Dim cat As New ADOX.Catalog()
        cat.Create("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Database)
        cat = Nothing
    Catch ex As Exception
    End Try
    Sleep(5)  ' Code not displayed but does not put the app to sleep just a delay with application.doevents...

Checking to see if there is something I'm missing or if there is another way to create and release the database....?

1 solution

I believe you should close your connection to the DB, because it's still opened.

Read more about Catalog here. Here is an example how one should work with connections (do not forget to close them).
Share this answer
bayotle 19-Feb-15 23:00pm    
This has been driving me nuts for a LONG time, I actually put it on the back burner and worked on other sections, now I'm coming to an end with this, I had to get it worked out...

MANY thanks!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900