I use this function for connection with the table
Public Function InitFoxConnection(ByVal lPath As String, ByRef lCon As ADODB.Connection, Optional lExclusive As Boolean = True, _
Optional lUser As String = "", Optional lPassword As String = "", _
Optional lSourceType As String = "DBF") As Boolean
Dim mCon As ADODB.Connection
Set mCon = New ADODB.Connection
Set lCon = Nothing
InitFoxConnection = True
On Error GoTo ErrorHandler
With mCon
If .State = adStateOpen Then
.Close
End If
.CursorLocation = adUseClient
.Mode = adModeShareExclusive
'adModeReadWrite
.ConnectionString = _
"Driver={Microsoft Visual FoxPro Driver};" & _
"Uid=" & Trim(lUser) & ";pwd=;" & Trim(lPassword) & _
"SourceDB=" & lPath & ";" & _
"SourceType=" & Trim(lSourceType) & ";" & _
"Exclusive=Yes" & ";"
.Open
End With
Set lCon = mCon
Exit Function
ErrorHandler:
MsgBox "Conexiunea la baza de date a esuat ..." & vbCrLf & _
Err.Description, vbCritical, gAppName
InitFoxConnection = False
End Function
when i try to execute the "pack" command i receive the error
Please excuse my English.
Thank you