The information in this article applies to:
SUMMARYFoxPro can use SQL pass-through commands and ODBC. This ability provides a methodology for communicating with different data sources using a common syntax. MORE INFORMATIONThe FoxPro Connectivity KitFoxPro provides users with a "pass through" SQL capability. That is, you can pass SQL commands to the ODBC data source by using SQL pass-through functions. This capability is provided through 12 functions that are used to perform various ODBC-related tasks.Single and Multitier ODBC DriversCurrent ODBC drivers fall into one of the following two categories: single- tier or multitier.
ODBC Conformance LevelsThere are two conformance levels for ODBC: API and SQL. The API conformance levels are Core, Level 1, and Level 2. These specify varying degrees of API support. Most current ODBC drivers are Level 1 and partially implement Level 2 features, such as scrollable cursors. (For a detailed discussion of this topic, refer to the ODBC SDK documentation listed at the end of this article.)The ODBC SQL conformance level is related to the SQL grammar implementation, and falls into one of the following three categories:
The syntax for each level can be obtained from the ODBC SDK documentation,
which is listed at the end of this article.
Scalar FunctionsODBC has a number of functions built-in to allow language independence between various database management systems. A list of these functions can be found in the following Microsoft Knowledge Base articles:Q103142 SQL Server String Funcs Supported by the Connectivity Kit Q103576 SQL Server Time/Date Func Support for Connectivity Kit Q103578 SQL Server Numeric Funcs Supported by Connectivity Kit Q104342 SQL Server System Funcs Supported by the Connectivity KitODBC functions are implemented with an ODBC "escape shorthand" syntax. This syntax looks like: {fn ODBCFunction([Arguments])}The following example shows how you can use the DBExec() function included in FoxPro 2.x with the SQRT() ODBC function:
In Visual FoxPro, use the following command:
To see an additional example of ODBC scalar functions, use the ClientServer
Wizard in the Professional edition of FoxPro version 2.6 for Windows to
create an outer join, and then examine the generated code.
REFERENCES"Microsoft ODBC 2.0 Programmer's Reference and SDK Guide," Microsoft Press Additional query words: CK multi-tier
Keywords : kbinterop kbDatabase kbVFp300 kbVFp500 kbVFp600 kbVFP260 |
Last Reviewed: August 8, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |