本文整理汇总了C++中ENTER_STMT_CS函数的典型用法代码示例。如果您正苦于以下问题:C++ ENTER_STMT_CS函数的具体用法?C++ ENTER_STMT_CS怎么用?C++ ENTER_STMT_CS使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ENTER_STMT_CS函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:plusql,项目名称:hsqldb-snapshot-20160112,代码行数:33,代码来源:odbcapi.c
示例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;
}
开发者ID:plusql,项目名称:hsqldb-snapshot-20160112,代码行数:27,代码来源:odbcapi.c
示例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;
}
开发者ID:plusql,项目名称:hsqldb-snapshot-20160112,代码行数:25,代码来源:odbcapi.c
示例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;
}
开发者ID:plusql,项目名称:hsqldb-snapshot-20160112,代码行数:27,代码来源:odbcapiw.c
示例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;
}
开发者ID:ringerc,项目名称:psqlODBC,代码行数:25,代码来源:odbcapi.c
示例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;
}
开发者ID:plusql,项目名称:hsqldb-snapshot-20160112,代码行数:35,代码来源:odbcapi.c
示例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;
}
开发者ID:plusql,项目名称:hsqldb-snapshot-20160112,代码行数:58,代码来源:odbcapiw.c
示例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;
}
开发者ID:plusql,项目名称:hsqldb-snapshot-20160112,代码行数:15,代码来源:odbcapi.c
示例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;
}
开发者ID:plusql,项目名称:hsqldb-snapshot-20160112,代码行数:15,代码来源:odbcapi.c
示例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;
}
开发者ID:plusql,项目名称:hsqldb-snapshot-20160112,代码行数:15,代码来源:odbcapi.c
示例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;
}
开发者ID:greenplum-db,项目名称:gpclients,代码行数:17,代码来源:odbcapi30.c
示例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;
}
开发者ID:ringerc,项目名称:psqlODBC,代码行数:16,代码来源:odbcapi.c
示例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;
}
开发者ID:plusql,项目名称:hsqldb-snapshot-20160112,代码行数:16,代码来源:odbcapi.c
示例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;
}
开发者ID:plusql,项目名称:hsqldb-snapshot-20160112,代码行数:16,代码来源:odbcapi.c
示例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;
}
开发者ID:plusql,项目名称:hsqldb-snapshot-20160112,代码行数:16,代码来源:odbcapi.c
示例16: SQLNumResultCols
RETCODE SQL_API
SQLNumResultCols(HSTMT StatementHandle,
SQLSMALLINT *ColumnCount)
{
RETCODE ret;
StatementClass *stmt = (StatementClass *) StatementHandle;
mylog("[SQLNumResultCols]");
ENTER_STMT_CS(stmt);
SC_clear_error(stmt);
StartRollbackState(stmt);
ret = PGAPI_NumResultCols(StatementHandle, ColumnCount);
ret = DiscardStatementSvp(stmt, ret, FALSE);
LEAVE_STMT_CS(stmt);
return ret;
}
开发者ID:plusql,项目名称:hsqldb-snapshot-20160112,代码行数:16,代码来源:odbcapi.c
示例17: SQLTablePrivilegesW
RETCODE SQL_API SQLTablePrivilegesW(
HSTMT hstmt,
SQLWCHAR *szCatalogName,
SQLSMALLINT cbCatalogName,
SQLWCHAR *szSchemaName,
SQLSMALLINT cbSchemaName,
SQLWCHAR *szTableName,
SQLSMALLINT cbTableName)
{
CSTR func = "SQLTablePrivilegesW";
RETCODE ret;
char *ctName, *scName, *tbName;
SQLLEN nmlen1, nmlen2, nmlen3;
StatementClass *stmt = (StatementClass *) hstmt;
ConnectionClass *conn;
BOOL lower_id;
UWORD flag = 0;
mylog("[%s]", func);
conn = SC_get_conn(stmt);
lower_id = SC_is_lower_case(stmt, conn);
ctName = ucs2_to_utf8(szCatalogName, cbCatalogName, &nmlen1, lower_id);
scName = ucs2_to_utf8(szSchemaName, cbSchemaName, &nmlen2, lower_id);
tbName = ucs2_to_utf8(szTableName, cbTableName, &nmlen3, lower_id);
ENTER_STMT_CS((StatementClass *) hstmt);
SC_clear_error(stmt);
StartRollbackState(stmt);
#if (ODBCVER >= 0x0300)
if (stmt->options.metadata_id)
flag |= PODBC_NOT_SEARCH_PATTERN;
#endif
if (SC_opencheck(stmt, func))
ret = SQL_ERROR;
else
ret = PGAPI_TablePrivileges(hstmt, ctName, (SQLSMALLINT) nmlen1,
scName, (SQLSMALLINT) nmlen2, tbName, (SQLSMALLINT) nmlen3, flag);
ret = DiscardStatementSvp(stmt, ret, FALSE);
LEAVE_STMT_CS((StatementClass *) hstmt);
if (ctName)
free(ctName);
if (scName)
free(scName);
if (tbName)
free(tbName);
return ret;
}
开发者ID:plusql,项目名称:hsqldb-snapshot-20160112,代码行数:46,代码来源:odbcapiw.c
示例18: SQLGetStmtOption
RETCODE SQL_API
SQLGetStmtOption(HSTMT StatementHandle,
SQLUSMALLINT Option, PTR Value)
{
CSTR func = "SQLGetStmtOption";
RETCODE ret;
StatementClass *stmt = (StatementClass *) StatementHandle;
mylog("[%s]", func);
ENTER_STMT_CS(stmt);
SC_clear_error(stmt);
StartRollbackState(stmt);
ret = PGAPI_GetStmtOption(StatementHandle, Option, Value, NULL, 64);
ret = DiscardStatementSvp(stmt, ret, FALSE);
LEAVE_STMT_CS(stmt);
return ret;
}
开发者ID:plusql,项目名称:hsqldb-snapshot-20160112,代码行数:17,代码来源:odbcapi.c
示例19: SQLParamOptions
RETCODE SQL_API
SQLParamOptions(HSTMT hstmt,
SQLULEN crow,
SQLULEN *pirow)
{
RETCODE ret;
StatementClass *stmt = (StatementClass *) hstmt;
mylog("[SQLParamOptions]");
ENTER_STMT_CS(stmt);
SC_clear_error(stmt);
StartRollbackState(stmt);
ret = PGAPI_ParamOptions(hstmt, crow, pirow);
ret = DiscardStatementSvp(stmt, ret, FALSE);
LEAVE_STMT_CS(stmt);
return ret;
}
开发者ID:ringerc,项目名称:psqlODBC,代码行数:17,代码来源:odbcapi.c
示例20: SQLSetPos
RETCODE SQL_API
SQLSetPos(HSTMT hstmt,
SQLSETPOSIROW irow,
SQLUSMALLINT fOption,
SQLUSMALLINT fLock)
{
RETCODE ret;
StatementClass *stmt = (StatementClass *) hstmt;
mylog("[SQLSetPos]");
ENTER_STMT_CS(stmt);
SC_clear_error(stmt);
StartRollbackState(stmt);
ret = PGAPI_SetPos(hstmt, irow, fOption, fLock);
ret = DiscardStatementSvp(stmt, ret, FALSE);
LEAVE_STMT_CS(stmt);
return ret;
}
开发者ID:ringerc,项目名称:psqlODBC,代码行数:18,代码来源:odbcapi.c
注:本文中的ENTER_STMT_CS函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论