View Full Version : DB Connection Problem
I'm trying to create a program that connects to a local database (it is selected by the user via OpenFile dialog). Once the file is selected, the user hits the Start Processing button and the connection to the database is created and opened. All this works fine, except when I try to connect to a database that is password protected (not using Workgroups, just a builtin database password), it gives the following error:
Additional information: Cannot start your application. The workgroup information file is missing or opened exclusively by another user.
In the connection string I've put in "Password=pass", should I be doing it differently?
AnubisTCP
06-16-04, 06:02 PM
I'm trying to create a program that connects to a local database (it is selected by the user via OpenFile dialog). Once the file is selected, the user hits the Start Processing button and the connection to the database is created and opened. All this works fine, except when I try to connect to a database that is password protected (not using Workgroups, just a builtin database password), it gives the following error:
Additional information: Cannot start your application. The workgroup information file is missing or opened exclusively by another user.
In the connection string I've put in "Password=pass", should I be doing it differently?
I imagine you have something similar to this;
Public Function OpenDB()
strDBConn = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Password=12345 ;Data Source=" & App.Path & "\something.mdb"
Set adoConn = New ADODB.Connection
With adoConn
.CommandTimeout = 0
.CursorLocation = adUseClient
.ConnectionString = strDBConn
.Open
End With
End Function
If this is the case then change "Password=12345" to "Jet OLEDB:Database Password=12345" minus the quotes.
vBulletin® v3.6.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.