PRB: SQL SELECT Cursor Resultset Changes when Variable Changes (246656)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 3.0
- Microsoft Visual FoxPro for Windows 3.0b
- Microsoft Visual FoxPro for Windows 5.0
- Microsoft Visual FoxPro for Windows 5.0a
- Microsoft Visual FoxPro for Windows 6.0
This article was previously published under Q246656 SYMPTOMS
The resultset of a cursor does not match the selection criteria from a SQL SELECT statement that includes a variable in the WHERE clause.
-or-
An error message similar to the one below is displayed when attempting to browse a cursor created with a SQL SELECT statement that includes a variable that is out of scope in the WHERE clause.
Variable 'MyVariable' not found
CAUSE
This behavior occurs when SET EXACT is set to OFF.
RESOLUTION- Set EXACT to ON.
- Use a SQL SELECT statement that does not set a filter condition:
MyVariable="Test"
SELECT * FROM MyTable WHERE MyField=MyVariable AND .T. INTO CURSOR MyCursor
Modification Type: | Major | Last Reviewed: | 5/12/2003 |
---|
Keywords: | kbDatabase kbpending kbprb kbSQLProg KB246656 kbAudDeveloper |
---|
|