computerguy2
Programmer
- Jun 28, 2003
- 10
Hi...I need to retrieve a value from a FoxPro database using a SQL statement and put that value into a variable. When I try to Select QOH and run lQOH = conn.Execute sqlstatement, recordsaffected, adCmdText I get a compile error, expected '='. Could someone please help me out.
Thanks..John
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
Set rsStock = New ADODB.Recordset
rsStock.Open "select * from stock", conn, adOpenDynamic, adLockOptimistic
sqlstatement = "Select qoh from stock where trim(barcodeno) = '0166410600'"
conn.Execute sqlstatement, recordsaffected, adCmdText
Thanks..John
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
Set rsStock = New ADODB.Recordset
rsStock.Open "select * from stock", conn, adOpenDynamic, adLockOptimistic
sqlstatement = "Select qoh from stock where trim(barcodeno) = '0166410600'"
conn.Execute sqlstatement, recordsaffected, adCmdText