M
macken09
im using vb6 and MSaccess 2003
Public Sub OpenDBConnection()
Dim strPath As String
strPath = CurrentProject.Path <<<<<error CurrentProject or
CurrentApplication
If Right$(strPath, 1) <> "\" Then
strPath = strPath & "\"
End If
strconek = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
strPath & "\data\MFMS.mdb;Persist Security Info=False"
Set conn = New ADODB.Connection
Set rec = New ADODB.Recordset
'strconek = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\sysnow\data\MFMS.mdb;Persist Security Info=False"
conn.CursorLocation = adUseClient
conn.Open strconek
End Sub
is there something wrong with my references
Public Sub OpenDBConnection()
Dim strPath As String
strPath = CurrentProject.Path <<<<<error CurrentProject or
CurrentApplication
If Right$(strPath, 1) <> "\" Then
strPath = strPath & "\"
End If
strconek = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
strPath & "\data\MFMS.mdb;Persist Security Info=False"
Set conn = New ADODB.Connection
Set rec = New ADODB.Recordset
'strconek = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\sysnow\data\MFMS.mdb;Persist Security Info=False"
conn.CursorLocation = adUseClient
conn.Open strconek
End Sub
is there something wrong with my references