FIX: SET ANSI ON Default Setting in VFPODBC Driver (169155)
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
This article was previously published under Q169155 SYMPTOMS
Queries with filter criteria run through the Visual FoxPro ODBC (VFPODBC)
driver could return fewer records than the same query run in Microsoft
Visual FoxPro.
CAUSE
The VFPODBC driver defaults SET ANSI to ON where the default for SET ANSI
in Microsoft Visual FoxPro is OFF. This setting cannot be changed in the
VFPODBC driver.
RESOLUTION
To work around not being able to use SET ANSI OFF for partial matches, you
can either use wildcards in the SQL Select statement, or create an OLE
Automation Server in Microsoft Visual FoxPro to manipulate the data in the
Microsoft Visual FoxPro database.
Visual FoxPro 6.0 ships with a new Visual FoxPro driver, version 6.00.8167,
that fixes this problem.
Wildcard Example
In the example given in the Steps to Reproduce Behavior section below,
replace the line:
?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.
Note that the above workaround will not be fully Rushmore optimized.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. This has been corrected in Visual FoxPro
6.0.
Modification Type: | Major | Last Reviewed: | 5/10/2003 |
---|
Keywords: | kbbug kbcode kbfix KB169155 |
---|
|