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

Click here to load this message in the networking platform