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:
How to obtain the number of rows affected by remote UPDATE, INSERT or DELETE statement
SQLExecDirect
..msdn    Add comment     W32 Constants      Translate this page
SQLExecDirect executes a preparable statement, using the current values of the parameter marker variables if any parameters exist in the statement.
Code examples:
How to obtain the number of rows affected by remote UPDATE, INSERT or DELETE statement
Declaration:
SQLRETURN SQLExecDirect(
    SQLHSTMT   StatementHandle,
    SQLCHAR *  StatementText,
    SQLINTEGER TextLength);
FoxPro declaration:
DECLARE SHORT SQLExecDirect IN odbc32;
    INTEGER StmtHandle,;
    STRING  StmtText,;
    INTEGER TextLen

Parameters:
StatementHandle
[Input]
Statement handle.

StatementText
[Input]
SQL statement to be executed.

TextLength
[Input]
Length of *StatementText.
Return value:
SQL_SUCCESS (0), SQL_SUCCESS_WITH_INFO (1), or an error code: SQL_NEED_DATA, SQL_STILL_EXECUTING, SQL_ERROR, SQL_NO_DATA, SQL_INVALID_HANDLE.
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2003-07-17 14:59:48
Modified: 2003-07-17 15:02:18
Visited in last 7 days: 10
User Contributed Notes:
ninad_dev@yahoo.com | 2006-12-08 11:39:46
Dear Sir / madam,

I got one problem. When I use a variable in select command in Sqlexec function to fetch a data from SQL server i got an error. How use variable in select command in sqlexec function? Pl. help me

Regards

Ninad.
ninad_dev@yahoo.com
A.M. | 2006-12-11 20:13:09
If you mean Visual FoxPro SQLExec function, then in the sql statement replace the variable with its actual value.

Otherwise you may try using parametrized remote views.

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.37), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.162.27.162)
1.3 min.Function: 'WSACleanup'
1.72 min.Function: 'SQLAllocHandle'
3.57 min.Function: 'SetMenu'
3.88 min.Function: 'waveInStart'
4.05 min.Function: 'waveOutGetNumDevs'
4.52 min.Function: 'SQLRowCount'
7.05 min.Function: 'WinHttpSendRequest'
Google
Advertise here!