computerguy2
Programmer
- Jun 28, 2003
- 10
When I use the update command in the following code I get a Run Time Error......Statement too long. Could you tell me how to use the update command in this case. It's VB6 and Visual FoxPro 6. Thanks
Private Sub Command2_Click()
Set conn = New ADODB.Connection
Let conn.ConnectionString = "Driver={Microsoft Visual Foxpro Driver};UID=;SourceType=DBF;SourceDB=c:\inventory;Exclusive=No;BackgroundFetch=No;Collate=Machine;Null=Yes;Deleted=Yes;"
conn.Open
hasconnected = True
Set rs1 = New ADODB.Recordset
rs1.Open "select * from stock", conn, adOpenDynamic, adLockOptimistic
rs1.Requery
rs1.MoveFirst
Text1.Text = rs1("BarcodeNo"
Do While rs1.EOF = False
Text1.Text = rs1("qoh"
If Trim(rs1("Barcodeno") = "5190600014" Then
MsgBox rs1("qoh"
rs1("qoh" = "55"
rs1.Update
End If
rs1.MoveNext
Loop
End Sub
Private Sub Command2_Click()
Set conn = New ADODB.Connection
Let conn.ConnectionString = "Driver={Microsoft Visual Foxpro Driver};UID=;SourceType=DBF;SourceDB=c:\inventory;Exclusive=No;BackgroundFetch=No;Collate=Machine;Null=Yes;Deleted=Yes;"
conn.Open
hasconnected = True
Set rs1 = New ADODB.Recordset
rs1.Open "select * from stock", conn, adOpenDynamic, adLockOptimistic
rs1.Requery
rs1.MoveFirst
Text1.Text = rs1("BarcodeNo"
Do While rs1.EOF = False
Text1.Text = rs1("qoh"
If Trim(rs1("Barcodeno") = "5190600014" Then
MsgBox rs1("qoh"
rs1("qoh" = "55"
rs1.Update
End If
rs1.MoveNext
Loop
End Sub