Using Win32 functions in Visual FoxPro Image Gallery
ODBC API
..msdn
SQLAllocEnv
SQLAllocHandle
SQLBindCol
SQLBrowseConnect
SQLConfigDataSource
SQLConnect
SQLCreateDataSource
SQLDataSources
SQLDisconnect
SQLDriverConnect
SQLDrivers
SQLExecDirect
SQLFetch
SQLFreeEnv
SQLFreeHandle
SQLGetConfigMode
SQLGetConnectAttr
SQLGetDiagRec
SQLGetEnvAttr
SQLGetFunctions
SQLGetInfo
SQLGetInstalledDrivers
SQLGetPrivateProfileString
SQLInstallerError
SQLManageDataSources
SQLNativeSql
SQLRowCount
SQLSetConfigMode
SQLSetEnvAttr
SQLTables
Code examples:
Using vendor-neutral SQL constructs
SQLNativeSql
..msdn    Add comment     W32 Constants      Translate this page
SQLNativeSql returns the SQL string as modified by the driver. SQLNativeSql does not execute the SQL statement.
Code examples:
Using vendor-neutral SQL constructs
Declaration:
SQLRETURN SQLNativeSql(
    SQLHDBC      ConnectionHandle,
    SQLCHAR *    InStatementText,
    SQLINTEGER   TextLength1,
    SQLCHAR *    OutStatementText,
    SQLINTEGER   BufferLength,
    SQLINTEGER * TextLength2Ptr);
FoxPro declaration:
DECLARE SHORT SQLNativeSql IN odbc32;
    INTEGER  ConnectionHandle,;
    STRING    InStatText,;
    INTEGER   TextLen1,;
    STRING  @ OutStatText,;
    INTEGER   BufferLen,;
    INTEGER @ TextLen2Ptr

Parameters:
ConnectionHandle
[Input]
Connection handle.

InStatementText
[Input]
SQL text string to be translated.

TextLength1
[Input]
Length of *InStatementText text string.

OutStatementText
[Output]
Pointer to a buffer in which to return the translated SQL string.

BufferLength
[Input]
Length of the *OutStatementText buffer.

TextLength2Ptr
[Output]
Pointer to a buffer in which to return the total number of bytes (excluding the null-termination byte) available to return in *OutStatementText.
Return value:
SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, or SQL_INVALID_HANDLE.
My comment:
Not all ODBC drivers support this function. As well not all of them support escape sequences. Both are supported by MS Access (MSDAO) and MS SQL Server. To my disappointment I found this functionality not supported by Visual FoxPro ODC driver (ver. 6.01.8629.01)

SQLNativeSql returns the SQL string as modified by the driver. SQLNativeSql does not execute the SQL statement..

Some links on vendor-neutral constructs:
Escape Sequences in ODBC
Step Up to Advanced SQL
Using Interoperable SQL. By Ken North
Word Index links for the SQLNativeSql :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2002-03-17 11:18:55
Modified: 2002-03-17 11:31:54
Visited in last 7 days: 26
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.35), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.211.247.249)
1.62 min.Function: 'ShowCursor'
Google
Advertise here!