PRB: Remote View to SQL Server with Logical Values
ID: Q160912
|
The information in this article applies to:
-
Microsoft Visual FoxPro for Windows, versions 3.0, 3.0b, 5.0, 6.0
SYMPTOMS
When you try to create a Remote View and try to filter based on logical .T.
or .F., the following error could occur:
Connectivity error:[Microsoft][ODBC SQL Server Driver][SQL Server]Line
1: Incorrect syntax near '.'.
CAUSE
SQL Server stores logical values as 1 or 0.
RESOLUTION
Under the filter tab of the Remote View place a 1 or 0 for the Example
criterion. If the desired records would contain .T. place a 1, and if .F.
place a 0.
STATUS
This behavior is by design.
MORE INFORMATION
Steps to Reproduce Behavior
- Open a Database Container with the command MODIFY DATA <dbc name>.
- Right-click in the Database Designer and select New Remote View.
- Select New View from the resulting dialog box and select a SQL Server
Data Source from either the Connections or Available Data Sources.
- Select a table from the SQL Server database that has a logical field.
- Add all of the fields to the Selected fields.
- Select the Filter tab. Under Field name, choose the logical field.
- For the Criteria choose "Like" and under Example, enter ".T.".
- Run the Query and note that the error appears. By simply changing
the ".T." to the number "1," you enable the query to perform correctly.
Additional query words:
vfoxwin kbdse
Keywords : kbVFp300 kbVFp300b kbVFp500 kbVFp600 FxinteropOdbc
Version : WINDOWS:3.0,3.0b,5.0,6.0
Platform : WINDOWS
Issue type :