Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Closing a Microsoft DAO connection?
Message
General information
Forum:
ASP.NET
Category:
Databases
Environment versions
Environment:
VB.NET 1.1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Miscellaneous
Thread ID:
01060316
Message ID:
01060406
Views:
10
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
Previous
Reply
Map
View

Click here to load this message in the networking platform