Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I am attempting to make a conection to a Access BE

Status
Not open for further replies.

jazzz

Technical User
Feb 17, 2000
433
US
utilizing ADO. I need to connect using a custom MDW so I can add a few new fields on the targeted BE's. I am new to ADO so I am struggling to make the conection. Here is what I have so far. This does give me a connection but without the proper permissions. How do I add my Custom MDW along with the necessary password to allow me the administrator authority thus allowing me to add the necessary fields?

Thanks in advance.

Private Sub cmdCreateFields_Click()
On Error GoTo DefaultHandler

Dim cnn As ADODB.Connection

Set cnn = New ADODB.Connection

cnn.ConnectionString = _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=c:\doit\JSSTestDB\JSSTestBE.mdb"

cnn.Open

Debug.Print cnn.ConnectionString

SubExit:

Set cnn = Nothing

Exit Sub

DefaultHandler:
Select Case Err.Number
'* Handle errors here.


Case Else

MsgBox "Error:" & " " & Me.Name & ": " & Err.Number & vbCrLf _
& Err.Description

End Select
Resume SubExit


End Sub

Life's a journey enjoy the ride...

jazzz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top