How can I update a record in a FoxPro table using ADO?
So that all other users in the network can see latest changes?
Is there a way to find out if a record been changed (after loading the recordset)
before issue an "Update"?
This is my coding to connect to this dbf, Can someone tell me where I need changing please?
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Private Sub Form_Load()
Dim strCnn, sSQL As String
Set cn = New ADODB.Connection
strCnn = "SourceType=DBF; " & _
"SourceDB=\\data\custdata;" & _
"Driver={Microsoft Visual FoxPro Driver};" & _
"Exclusive=no"
Set cn = New ADODB.Connection
cn.CursorLocation = adUseClient
cn.Open strCnn
sSQL = "SELECT * FROM CUSTdatx "
sSQL = sSQL & " WHERE Len(Trim(ActiveCust))>0"
Set rs = New ADODB.Recordset
rs.CursorLocation = adUseClient
rs.Open sSQL, cn, adOpenStatic, adLockOptimistic, adCmdUnknown
End Sub
So that all other users in the network can see latest changes?
Is there a way to find out if a record been changed (after loading the recordset)
before issue an "Update"?
This is my coding to connect to this dbf, Can someone tell me where I need changing please?
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Private Sub Form_Load()
Dim strCnn, sSQL As String
Set cn = New ADODB.Connection
strCnn = "SourceType=DBF; " & _
"SourceDB=\\data\custdata;" & _
"Driver={Microsoft Visual FoxPro Driver};" & _
"Exclusive=no"
Set cn = New ADODB.Connection
cn.CursorLocation = adUseClient
cn.Open strCnn
sSQL = "SELECT * FROM CUSTdatx "
sSQL = sSQL & " WHERE Len(Trim(ActiveCust))>0"
Set rs = New ADODB.Recordset
rs.CursorLocation = adUseClient
rs.Open sSQL, cn, adOpenStatic, adLockOptimistic, adCmdUnknown
End Sub