Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this
You will need the location of the Microsoft Access Workgroup Information file (.mdw) A username and password from the Microsoft Access Workgroup Information file Set objConnection = CreateObject("ADODB.Connection") ' Set objrs = CreateObject("ADODB.Recordset") objConnection.Provider = "Microsoft.Jet.OLEDB.4.0" strSQL = "SELECT * " strSQL = strSQL & "FROM customer " objConnection.Open "user id = userid; _ data source=c:\data.mdb; _ persist security info = true; _ password = mdwPassword; _ jet oledb:System database=c:\laptop\bci.mdw;" objrs.Open strSQL, objConnection "shin" wrote in message ... I have th following code to connect to an Access DB that is password protected: Set cn = New ADODB.Connection cn.Open "Provider=Microsoft.Jet.OLEDB.4.0; " & _ "Data Source=S:\ACCTG\RMSys\RMDB.mdb;" & _ "User Id=admin;" & _ "Password=ces" I get the error message: Cannot start your application. The workgroup information file is missingor opened exclusively by another user. This is not a system DB, it's actually a very simple databse that I created that is password protected since it is located on a network drive. I don't want anyone else opening the database. Can anyone help out? Thanks. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I tried the code below, and I keep getting a syntax
error. Can anyone help out? -----Original Message----- Try this You will need the location of the Microsoft Access Workgroup Information file (.mdw) A username and password from the Microsoft Access Workgroup Information file Set objConnection = CreateObject("ADODB.Connection") ' Set objrs = CreateObject("ADODB.Recordset") objConnection.Provider = "Microsoft.Jet.OLEDB.4.0" strSQL = "SELECT * " strSQL = strSQL & "FROM customer " objConnection.Open "user id = userid; _ data source=c:\data.mdb; _ persist security info = true; _ password = mdwPassword; _ jet oledb:System database=c:\laptop\bci.mdw;" objrs.Open strSQL, objConnection "shin" wrote in message ... I have th following code to connect to an Access DB that is password protected: Set cn = New ADODB.Connection cn.Open "Provider=Microsoft.Jet.OLEDB.4.0; " & _ "Data Source=S:\ACCTG\RMSys\RMDB.mdb;" & _ "User Id=admin;" & _ "Password=ces" I get the error message: Cannot start your application. The workgroup information file is missingor opened exclusively by another user. This is not a system DB, it's actually a very simple databse that I created that is password protected since it is located on a network drive. I don't want anyone else opening the database. Can anyone help out? Thanks. . |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You need "Microsoft ActiveX Data Objects 2.0 Library" or higher in the
references of the VBAProject. "Shin" wrote in message ... I tried the code below, and I keep getting a syntax error. Can anyone help out? -----Original Message----- Try this You will need the location of the Microsoft Access Workgroup Information file (.mdw) A username and password from the Microsoft Access Workgroup Information file Set objConnection = CreateObject("ADODB.Connection") ' Set objrs = CreateObject("ADODB.Recordset") objConnection.Provider = "Microsoft.Jet.OLEDB.4.0" strSQL = "SELECT * " strSQL = strSQL & "FROM customer " objConnection.Open "user id = userid; _ data source=c:\data.mdb; _ persist security info = true; _ password = mdwPassword; _ jet oledb:System database=c:\laptop\bci.mdw;" objrs.Open strSQL, objConnection "shin" wrote in message ... I have th following code to connect to an Access DB that is password protected: Set cn = New ADODB.Connection cn.Open "Provider=Microsoft.Jet.OLEDB.4.0; " & _ "Data Source=S:\ACCTG\RMSys\RMDB.mdb;" & _ "User Id=admin;" & _ "Password=ces" I get the error message: Cannot start your application. The workgroup information file is missingor opened exclusively by another user. This is not a system DB, it's actually a very simple databse that I created that is password protected since it is located on a network drive. I don't want anyone else opening the database. Can anyone help out? Thanks. . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I access Visual Basic in Excel 2007 Trial? | Setting up and Configuration of Excel | |||
visual basic within Access If...Then | Excel Discussion (Misc queries) | |||
visual basic within Access If...Then | Excel Discussion (Misc queries) | |||
Trust access to visual basic project in XP systems | Excel Discussion (Misc queries) | |||
Trust access to visual basic project greyed out | Excel Discussion (Misc queries) |