本文整理匯總了C++中ENTER_STMT_CS函數的典型用法代碼示例。如果您正苦於以下問題:C++ ENTER_STMT_CS函數的具體用法?C++ ENTER_STMT_CS怎麽用?C++ ENTER_STMT_CS使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了ENTER_STMT_CS函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: SQLFetch
RETCODE SQL_API
SQLFetch(HSTMT StatementHandle)
{
CSTR func = "SQLFetch";
RETCODE ret;
StatementClass *stmt = (StatementClass *) StatementHandle;
ENTER_STMT_CS(stmt);
SC_clear_error(stmt);
StartRollbackState(stmt);
#if (ODBCVER >= 0x0300)
if (SC_get_conn(stmt)->driver_version >= 0x0300)
{
IRDFields *irdopts = SC_get_IRDF(stmt);
ARDFields *ardopts = SC_get_ARDF(stmt);
SQLUSMALLINT *rowStatusArray = irdopts->rowStatusArray;
SQLLEN *pcRow = irdopts->rowsFetched;
mylog("[[%s]]", func);
ret = PGAPI_ExtendedFetch(StatementHandle, SQL_FETCH_NEXT, 0,
pcRow, rowStatusArray, 0, ardopts->size_of_rowset);
stmt->transition_status = STMT_TRANSITION_FETCH_SCROLL;
}
else
#endif
{
mylog("[%s]", func);
ret = PGAPI_Fetch(StatementHandle);
}
ret = DiscardStatementSvp(stmt, ret, FALSE);
LEAVE_STMT_CS(stmt);
return ret;
}
示例2: SQLBindParameter
RETCODE SQL_API
SQLBindParameter(
HSTMT hstmt,
SQLUSMALLINT ipar,
SQLSMALLINT fParamType,
SQLSMALLINT fCType,
SQLSMALLINT fSqlType,
SQLULEN cbColDef,
SQLSMALLINT ibScale,
PTR rgbValue,
SQLLEN cbValueMax,
SQLLEN *pcbValue)
{
RETCODE ret;
StatementClass *stmt = (StatementClass *) hstmt;
mylog("[SQLBindParameter]");
ENTER_STMT_CS(stmt);
SC_clear_error(stmt);
StartRollbackState(stmt);
ret = PGAPI_BindParameter(hstmt, ipar, fParamType, fCType,
fSqlType, cbColDef, ibScale, rgbValue, cbValueMax,
pcbValue);
ret = DiscardStatementSvp(stmt, ret, FALSE);
LEAVE_STMT_CS(stmt);
return ret;
}
示例3: SQLExecDirect
RETCODE SQL_API
SQLExecDirect(HSTMT StatementHandle,
SQLCHAR *StatementText, SQLINTEGER TextLength)
{
CSTR func = "SQLExecDirect";
RETCODE ret;
StatementClass *stmt = (StatementClass *) StatementHandle;
UWORD flag = 0;
mylog("[%s]", func);
ENTER_STMT_CS(stmt);
SC_clear_error(stmt);
if (PG_VERSION_GE(SC_get_conn(stmt), 7.4))
flag |= PODBC_WITH_HOLD;
if (SC_opencheck(stmt, func))
ret = SQL_ERROR;
else
{
StartRollbackState(stmt);
ret = PGAPI_ExecDirect(StatementHandle, StatementText, TextLength, flag);
ret = DiscardStatementSvp(stmt, ret, FALSE);
}
LEAVE_STMT_CS(stmt);
return ret;
}
示例4: SQLExecDirectW
RETCODE SQL_API SQLExecDirectW(HSTMT StatementHandle,
SQLWCHAR *StatementText, SQLINTEGER TextLength)
{
CSTR func = "SQLExecDirectW";
RETCODE ret;
char *stxt;
SQLLEN slen;
StatementClass *stmt = (StatementClass *) StatementHandle;
UWORD flag = 0;
mylog("[%s]", func);
stxt = ucs2_to_utf8(StatementText, TextLength, &slen, FALSE);
ENTER_STMT_CS(stmt);
SC_clear_error(stmt);
if (PG_VERSION_GE(SC_get_conn(stmt), 7.4))
flag |= PODBC_WITH_HOLD;
StartRollbackState(stmt);
if (SC_opencheck(stmt, func))
ret = SQL_ERROR;
else
ret = PGAPI_ExecDirect(StatementHandle, stxt, (SQLINTEGER) slen, flag);
ret = DiscardStatementSvp(stmt, ret, FALSE);
LEAVE_STMT_CS(stmt);
if (stxt)
free(stxt);
return ret;
}
示例5: SQLExecute
RETCODE SQL_API
SQLExecute(HSTMT StatementHandle)
{
CSTR func = "SQLExecute";
RETCODE ret;
StatementClass *stmt = (StatementClass *) StatementHandle;
UWORD flag = 0;
mylog("[%s]", func);
ENTER_STMT_CS(stmt);
SC_clear_error(stmt);
if (PG_VERSION_GE(SC_get_conn(stmt), 7.4))
flag |= PODBC_WITH_HOLD;
if (SC_opencheck(stmt, func))
ret = SQL_ERROR;
else
{
StartRollbackState(stmt);
stmt->exec_current_row = -1;
ret = PGAPI_Execute(StatementHandle, flag);
ret = DiscardStatementSvp(stmt, ret, FALSE);
}
LEAVE_STMT_CS(stmt);
return ret;
}
示例6: SQLExtendedFetch
RETCODE SQL_API
SQLExtendedFetch(
HSTMT hstmt,
SQLUSMALLINT fFetchType,
SQLLEN irow,
#ifdef WITH_UNIXODBC
SQLROWSETSIZE *pcrow,
#else
SQLULEN *pcrow,
#endif /* WITH_UNIXODBC */
SQLUSMALLINT *rgfRowStatus)
{
RETCODE ret;
StatementClass *stmt = (StatementClass *) hstmt;
mylog("[SQLExtendedFetch]");
ENTER_STMT_CS(stmt);
SC_clear_error(stmt);
StartRollbackState(stmt);
#ifdef WITH_UNIXODBC
{
SQLULEN retrieved;
ret = PGAPI_ExtendedFetch(hstmt, fFetchType, irow, &retrieved, rgfRowStatus, 0, SC_get_ARDF(stmt)->size_of_rowset_odbc2);
if (pcrow)
*pcrow = retrieved;
}
#else
ret = PGAPI_ExtendedFetch(hstmt, fFetchType, irow, pcrow, rgfRowStatus, 0, SC_get_ARDF(stmt)->size_of_rowset_odbc2);
#endif /* WITH_UNIXODBC */
stmt->transition_status = STMT_TRANSITION_EXTENDED_FETCH;
ret = DiscardStatementSvp(stmt, ret, FALSE);
LEAVE_STMT_CS(stmt);
return ret;
}
示例7: SQLForeignKeysW
RETCODE SQL_API SQLForeignKeysW(
HSTMT hstmt,
SQLWCHAR *szPkCatalogName,
SQLSMALLINT cbPkCatalogName,
SQLWCHAR *szPkSchemaName,
SQLSMALLINT cbPkSchemaName,
SQLWCHAR *szPkTableName,
SQLSMALLINT cbPkTableName,
SQLWCHAR *szFkCatalogName,
SQLSMALLINT cbFkCatalogName,
SQLWCHAR *szFkSchemaName,
SQLSMALLINT cbFkSchemaName,
SQLWCHAR *szFkTableName,
SQLSMALLINT cbFkTableName)
{
CSTR func = "SQLForeignKeysW";
RETCODE ret;
char *ctName, *scName, *tbName, *fkctName, *fkscName, *fktbName;
SQLLEN nmlen1, nmlen2, nmlen3, nmlen4, nmlen5, nmlen6;
StatementClass *stmt = (StatementClass *) hstmt;
ConnectionClass *conn;
BOOL lower_id;
mylog("[%s]", func);
conn = SC_get_conn(stmt);
lower_id = SC_is_lower_case(stmt, conn);
ctName = ucs2_to_utf8(szPkCatalogName, cbPkCatalogName, &nmlen1, lower_id);
scName = ucs2_to_utf8(szPkSchemaName, cbPkSchemaName, &nmlen2, lower_id);
tbName = ucs2_to_utf8(szPkTableName, cbPkTableName, &nmlen3, lower_id);
fkctName = ucs2_to_utf8(szFkCatalogName, cbFkCatalogName, &nmlen4, lower_id);
fkscName = ucs2_to_utf8(szFkSchemaName, cbFkSchemaName, &nmlen5, lower_id);
fktbName = ucs2_to_utf8(szFkTableName, cbFkTableName, &nmlen6, lower_id);
ENTER_STMT_CS(stmt);
SC_clear_error(stmt);
StartRollbackState(stmt);
if (SC_opencheck(stmt, func))
ret = SQL_ERROR;
else
ret = PGAPI_ForeignKeys(hstmt, ctName, (SQLSMALLINT) nmlen1,
scName, (SQLSMALLINT) nmlen2, tbName, (SQLSMALLINT) nmlen3,
fkctName, (SQLSMALLINT) nmlen4, fkscName, (SQLSMALLINT) nmlen5,
fktbName, (SQLSMALLINT) nmlen6);
ret = DiscardStatementSvp(stmt, ret, FALSE);
LEAVE_STMT_CS(stmt);
if (ctName)
free(ctName);
if (scName)
free(scName);
if (tbName)
free(tbName);
if (fkctName)
free(fkctName);
if (fkscName)
free(fkscName);
if (fktbName)
free(fktbName);
return ret;
}
示例8: SQLMoreResults
RETCODE SQL_API
SQLMoreResults(HSTMT hstmt)
{
RETCODE ret;
StatementClass *stmt = (StatementClass *) hstmt;
mylog("[SQLMoreResults]");
ENTER_STMT_CS(stmt);
SC_clear_error(stmt);
StartRollbackState(stmt);
ret = PGAPI_MoreResults(hstmt);
ret = DiscardStatementSvp(stmt, ret, FALSE);
LEAVE_STMT_CS(stmt);
return ret;
}
示例9: SQLParamData
RETCODE SQL_API
SQLParamData(HSTMT StatementHandle,
PTR *Value)
{
RETCODE ret;
StatementClass *stmt = (StatementClass *) StatementHandle;
mylog("[SQLParamData]");
ENTER_STMT_CS(stmt);
SC_clear_error(stmt);
ret = PGAPI_ParamData(StatementHandle, Value);
ret = DiscardStatementSvp(stmt, ret, FALSE);
LEAVE_STMT_CS(stmt);
return ret;
}
示例10: SQLPutData
RETCODE SQL_API
SQLPutData(HSTMT StatementHandle,
PTR Data, SQLLEN StrLen_or_Ind)
{
RETCODE ret;
StatementClass *stmt = (StatementClass *) StatementHandle;
mylog("[SQLPutData]");
ENTER_STMT_CS(stmt);
SC_clear_error(stmt);
ret = PGAPI_PutData(StatementHandle, Data, StrLen_or_Ind);
ret = DiscardStatementSvp(stmt, ret, TRUE);
LEAVE_STMT_CS(stmt);
return ret;
}
示例11: SQLCloseCursor
/* New function */
RETCODE SQL_API
SQLCloseCursor(HSTMT StatementHandle)
{
CSTR func = "SQLCloseCursor";
StatementClass *stmt = (StatementClass *) StatementHandle;
RETCODE ret;
mylog("[[%s]]", func);
ENTER_STMT_CS(stmt);
SC_clear_error(stmt);
StartRollbackState(stmt);
ret = PGAPI_FreeStmt(StatementHandle, SQL_CLOSE);
ret = DiscardStatementSvp(stmt,ret, FALSE);
LEAVE_STMT_CS(stmt);
return ret;
}
示例12: SQLNumParams
RETCODE SQL_API
SQLNumParams(HSTMT hstmt,
SQLSMALLINT *pcpar)
{
RETCODE ret;
StatementClass *stmt = (StatementClass *) hstmt;
mylog("[SQLNumParams]");
ENTER_STMT_CS(stmt);
SC_clear_error(stmt);
StartRollbackState(stmt);
ret = PGAPI_NumParams(hstmt, pcpar);
ret = DiscardStatementSvp(stmt, ret, FALSE);
LEAVE_STMT_CS(stmt);
return ret;
}
示例13: SQLSetStmtOption
RETCODE SQL_API
SQLSetStmtOption(HSTMT StatementHandle,
SQLUSMALLINT Option, SQLULEN Value)
{
RETCODE ret;
StatementClass *stmt = (StatementClass *) StatementHandle;
mylog("[SQLSetStmtOption]");
ENTER_STMT_CS(stmt);
SC_clear_error(stmt);
StartRollbackState(stmt);
ret = PGAPI_SetStmtOption(StatementHandle, Option, Value);
ret = DiscardStatementSvp(stmt, ret, FALSE);
LEAVE_STMT_CS(stmt);
return ret;
}
示例14: SQLRowCount
RETCODE SQL_API
SQLRowCount(HSTMT StatementHandle,
SQLLEN *RowCount)
{
RETCODE ret;
StatementClass *stmt = (StatementClass *) StatementHandle;
mylog("[SQLRowCount]");
ENTER_STMT_CS(stmt);
SC_clear_error(stmt);
StartRollbackState(stmt);
ret = PGAPI_RowCount(StatementHandle, RowCount);
ret = DiscardStatementSvp(stmt, ret, FALSE);
LEAVE_STMT_CS(stmt);
return ret;
}
示例15: SQLSetCursorName
RETCODE SQL_API
SQLSetCursorName(HSTMT StatementHandle,
SQLCHAR *CursorName, SQLSMALLINT NameLength)
{
RETCODE ret;
StatementClass *stmt = (StatementClass *) StatementHandle;
mylog("[SQLSetCursorName]");
ENTER_STMT_CS(stmt);
SC_clear_error(stmt);
StartRollbackState(stmt);
ret = PGAPI_SetCursorName(StatementHandle, CursorName, NameLength);
ret = DiscardStatementSvp(stmt, ret, FALSE);
LEAVE_STMT_CS(stmt);
return ret;
}