Article ID: 169155
Article Last Modified on 5/10/2003
?SQLEXEC(nh,'SELECT * FROM Customer WHERE Cust_id = "A"','cur1')with the line:
?SQLEXEC(nh,'SELECT * FROM Customer WHERE Cust_id LIKE "A%"','cur1')and the line:
?SQLEXEC(nh,'SELECT * FROM Customer WHERE Cust_id = "A"','cur2')with the line:
?SQLEXEC(nh,'SELECT * FROM Customer WHERE Cust_id LIKE "A%"','cur2')When the above lines are substituted into the sample code below, each Browse window should have four records.
CLOSE DATABASES ALL
CLEAR ALL
CLEAR
*Create the datasource pointed to the sample data
DECLARE Integer SQLConfigDataSource in odbccp32.dll Integer, Integer, ;
String, String
lcPath = HOME()+'samples\data' && Check this path and make sure
&& it points to the folder containing
&& the Customer table.
settings="DSN=VFP Tables"+chr(0)+;
"Description=VFP Desc"+chr(0)+;
"SourceDB="+lcPath+chr(0)+;
"SourceType=DBF"
? SQLConfigDataSource(0,1,"Microsoft Visual FoxPro Driver",settings)
nh = SQLCONNECT('VFP Tables')
? nh
? SQLEXEC(nh,'SET ANSI OFF')
? SQLEXEC(nh,'SELECT * FROM Customer WHERE Cust_id = "A"','cur1')
BROWSE LAST NOWAIT
? SQLEXEC(nh,'SET ANSI ON')
? SQLEXEC(nh,'SELECT * FROM Customer WHERE Cust_id = "A"','cur2')
BROWSE LAST NOWAIT
? SQLDISCONNECT(nh)
Both Browse windows should have no records.
Additional query words: kbvfp600fix
Keywords: kbbug kbfix kbcode KB169155