Do you .close() the connection?
>I have to create an access db and then open it to run some queries. I have added a reference to MS DAO in my project. Here is what I have so far.
>
>
>Dim NewDB As New DAO.DBEngineClass
>
>NewDB.CreateDatabase("test.mdb", DAO.LanguageConstants.dbLangGeneral, DAO.DatabaseTypeEnum.dbDecrypt)
>
>Dim myConn As New System.Data.Odbc.OdbcConnection("Driver={Microsoft Access Driver(*.mdb)};Dbq=test.mdb;Exclusive=1;Uid=admin;Pwd=")
>
>myConn.Open()
>
>
>The myConn.Open() fails because it says the db is already in use. I tried setting NewDB = Nothing but that doesnt work either. How do I get NewDB to release its connection to the database?
Wayne Myers, MCSD
Senior Consultant
Forte' Incorporated
"The only things you can take to heaven are those which you give away" Author Unknown