odbc_export.h
#undef tdsdump_log
#ifdef ENABLE_ODBC_WIDE
static SQLRETURN _SQLDriverConnect(SQLHDBC hdbc,
SQLHWND hwnd,
ODBC_CHAR * szConnStrIn, SQLSMALLINT cbConnStrIn,
ODBC_CHAR * szConnStrOut, SQLSMALLINT cbConnStrOutMax, SQLSMALLINT FAR* pcbConnStrOut,
SQLUSMALLINT fDriverCompletion, int wide);
SQLRETURN ODBC_PUBLIC ODBC_API SQLDriverConnectW(
SQLHDBC hdbc,
SQLHWND hwnd,
SQLWCHAR * szConnStrIn, SQLSMALLINT cbConnStrIn,
SQLWCHAR * szConnStrOut, SQLSMALLINT cbConnStrOutMax, SQLSMALLINT FAR* pcbConnStrOut,
SQLUSMALLINT fDriverCompletion)
{
if (TDS_UNLIKELY(tds_write_dump)) {
SQLWSTR_BUFS(1);
tdsdump_log(TDS_DBG_FUNC, "SQLDriverConnectW(%p, %p, %ls, %d, %p, %d, %p, %u)\n",
hdbc,
hwnd,
SQLWSTR(szConnStrIn), (int) cbConnStrIn,
szConnStrOut, (int) cbConnStrOutMax, pcbConnStrOut,
(unsigned int) fDriverCompletion);
SQLWSTR_FREE();
}
return _SQLDriverConnect(hdbc,
hwnd,
(ODBC_CHAR*) szConnStrIn, cbConnStrIn,
(ODBC_CHAR*) szConnStrOut, cbConnStrOutMax, pcbConnStrOut,
fDriverCompletion, 1);
}
#endif
SQLRETURN ODBC_PUBLIC ODBC_API SQLDriverConnect(
SQLHDBC hdbc,
SQLHWND hwnd,
SQLCHAR * szConnStrIn, SQLSMALLINT cbConnStrIn,
SQLCHAR * szConnStrOut, SQLSMALLINT cbConnStrOutMax, SQLSMALLINT FAR* pcbConnStrOut,
SQLUSMALLINT fDriverCompletion)
{
TDSDUMP_LOG_FAST(TDS_DBG_FUNC, "SQLDriverConnect(%p, %p, %s, %d, %p, %d, %p, %u)\n",
hdbc,
hwnd,
(const char*) szConnStrIn, (int) cbConnStrIn,
szConnStrOut, (int) cbConnStrOutMax, pcbConnStrOut,
(unsigned int) fDriverCompletion);
#ifdef ENABLE_ODBC_WIDE
return _SQLDriverConnect(hdbc,
hwnd,
(ODBC_CHAR*) szConnStrIn, cbConnStrIn,
(ODBC_CHAR*) szConnStrOut, cbConnStrOutMax, pcbConnStrOut,
fDriverCompletion, 0);
#else
return _SQLDriverConnect(hdbc,
hwnd,
szConnStrIn, cbConnStrIn,
szConnStrOut, cbConnStrOutMax, pcbConnStrOut,
fDriverCompletion);
#endif
}
#ifdef ENABLE_ODBC_WIDE
static SQLRETURN _SQLColumnPrivileges(SQLHSTMT hstmt,
ODBC_CHAR * szCatalogName, SQLSMALLINT cbCatalogName,
ODBC_CHAR * szSchemaName, SQLSMALLINT cbSchemaName,
ODBC_CHAR * szTableName, SQLSMALLINT cbTableName,
ODBC_CHAR * szColumnName, SQLSMALLINT cbColumnName, int wide);
SQLRETURN ODBC_PUBLIC ODBC_API SQLColumnPrivilegesW(
SQLHSTMT hstmt,
SQLWCHAR * szCatalogName, SQLSMALLINT cbCatalogName,
SQLWCHAR * szSchemaName, SQLSMALLINT cbSchemaName,
SQLWCHAR * szTableName, SQLSMALLINT cbTableName,
SQLWCHAR * szColumnName, SQLSMALLINT cbColumnName)
{
if (TDS_UNLIKELY(tds_write_dump)) {
SQLWSTR_BUFS(4);
tdsdump_log(TDS_DBG_FUNC, "SQLColumnPrivilegesW(%p, %ls, %d, %ls, %d, %ls, %d, %ls, %d)\n",
hstmt,
SQLWSTR(szCatalogName), (int) cbCatalogName,
SQLWSTR(szSchemaName), (int) cbSchemaName,
SQLWSTR(szTableName), (int) cbTableName,
SQLWSTR(szColumnName), (int) cbColumnName);
SQLWSTR_FREE();
}
return _SQLColumnPrivileges(hstmt,
(ODBC_CHAR*) szCatalogName, cbCatalogName,
(ODBC_CHAR*) szSchemaName, cbSchemaName,
(ODBC_CHAR*) szTableName, cbTableName,
(ODBC_CHAR*) szColumnName, cbColumnName, 1);
}
#endif
SQLRETURN ODBC_PUBLIC ODBC_API SQLColumnPrivileges(
SQLHSTMT hstmt,
SQLCHAR * szCatalogName, SQLSMALLINT cbCatalogName,
SQLCHAR * szSchemaName, SQLSMALLINT cbSchemaName,
SQLCHAR * szTableName, SQLSMALLINT cbTableName,
SQLCHAR * szColumnName, SQLSMALLINT cbColumnName)
{
TDSDUMP_LOG_FAST(TDS_DBG_FUNC, "SQLColumnPrivileges(%p, %s, %d, %s, %d, %s, %d, %s, %d)\n",
hstmt,
(const char*) szCatalogName, (int) cbCatalogName,
(const char*) szSchemaName, (int) cbSchemaName,
(const char*) szTableName, (int) cbTableName,
(const char*) szColumnName, (int) cbColumnName);
#ifdef ENABLE_ODBC_WIDE
return _SQLColumnPrivileges(hstmt,
(ODBC_CHAR*) szCatalogName, cbCatalogName,
(ODBC_CHAR*) szSchemaName, cbSchemaName,
(ODBC_CHAR*) szTableName, cbTableName,
(ODBC_CHAR*) szColumnName, cbColumnName, 0);
#else
return _SQLColumnPrivileges(hstmt,
szCatalogName, cbCatalogName,
szSchemaName, cbSchemaName,
szTableName, cbTableName,
szColumnName, cbColumnName);
#endif
}
#ifdef ENABLE_ODBC_WIDE
static SQLRETURN _SQLForeignKeys(SQLHSTMT hstmt,
ODBC_CHAR * szPkCatalogName, SQLSMALLINT cbPkCatalogName,
ODBC_CHAR * szPkSchemaName, SQLSMALLINT cbPkSchemaName,
ODBC_CHAR * szPkTableName, SQLSMALLINT cbPkTableName,
ODBC_CHAR * szFkCatalogName, SQLSMALLINT cbFkCatalogName,
ODBC_CHAR * szFkSchemaName, SQLSMALLINT cbFkSchemaName,
ODBC_CHAR * szFkTableName, SQLSMALLINT cbFkTableName, int wide);
SQLRETURN ODBC_PUBLIC ODBC_API SQLForeignKeysW(
SQLHSTMT 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)
{
if (TDS_UNLIKELY(tds_write_dump)) {
SQLWSTR_BUFS(6);
tdsdump_log(TDS_DBG_FUNC, "SQLForeignKeysW(%p, %ls, %d, %ls, %d, %ls, %d, %ls, %d, %ls, %d, %ls, %d)\n",
hstmt,
SQLWSTR(szPkCatalogName), (int) cbPkCatalogName,
SQLWSTR(szPkSchemaName), (int) cbPkSchemaName,
SQLWSTR(szPkTableName), (int) cbPkTableName,
SQLWSTR(szFkCatalogName), (int) cbFkCatalogName,
SQLWSTR(szFkSchemaName), (int) cbFkSchemaName,
SQLWSTR(szFkTableName), (int) cbFkTableName);
SQLWSTR_FREE();
}
return _SQLForeignKeys(hstmt,
(ODBC_CHAR*) szPkCatalogName, cbPkCatalogName,
(ODBC_CHAR*) szPkSchemaName, cbPkSchemaName,
(ODBC_CHAR*) szPkTableName, cbPkTableName,
(ODBC_CHAR*) szFkCatalogName, cbFkCatalogName,
(ODBC_CHAR*) szFkSchemaName, cbFkSchemaName,
(ODBC_CHAR*) szFkTableName, cbFkTableName, 1);
}
#endif
SQLRETURN ODBC_PUBLIC ODBC_API SQLForeignKeys(
SQLHSTMT hstmt,
SQLCHAR * szPkCatalogName, SQLSMALLINT cbPkCatalogName,
SQLCHAR * szPkSchemaName, SQLSMALLINT cbPkSchemaName,
SQLCHAR * szPkTableName, SQLSMALLINT cbPkTableName,
SQLCHAR * szFkCatalogName, SQLSMALLINT cbFkCatalogName,
SQLCHAR * szFkSchemaName, SQLSMALLINT cbFkSchemaName,
SQLCHAR * szFkTableName, SQLSMALLINT cbFkTableName)
{
TDSDUMP_LOG_FAST(TDS_DBG_FUNC, "SQLForeignKeys(%p, %s, %d, %s, %d, %s, %d, %s, %d, %s, %d, %s, %d)\n",
hstmt,
(const char*) szPkCatalogName, (int) cbPkCatalogName,
(const char*) szPkSchemaName, (int) cbPkSchemaName,
(const char*) szPkTableName, (int) cbPkTableName,
(const char*) szFkCatalogName, (int) cbFkCatalogName,
(const char*) szFkSchemaName, (int) cbFkSchemaName,
(const char*) szFkTableName, (int) cbFkTableName);
#ifdef ENABLE_ODBC_WIDE
return _SQLForeignKeys(hstmt,
(ODBC_CHAR*) szPkCatalogName, cbPkCatalogName,
(ODBC_CHAR*) szPkSchemaName, cbPkSchemaName,
(ODBC_CHAR*) szPkTableName, cbPkTableName,
(ODBC_CHAR*) szFkCatalogName, cbFkCatalogName,
(ODBC_CHAR*) szFkSchemaName, cbFkSchemaName,
(ODBC_CHAR*) szFkTableName, cbFkTableName, 0);
#else
return _SQLForeignKeys(hstmt,
szPkCatalogName, cbPkCatalogName,
szPkSchemaName, cbPkSchemaName,
szPkTableName, cbPkTableName,
szFkCatalogName, cbFkCatalogName,
szFkSchemaName, cbFkSchemaName,
szFkTableName, cbFkTableName);
#endif
}
#ifdef ENABLE_ODBC_WIDE
static SQLRETURN _SQLNativeSql(SQLHDBC hdbc,
ODBC_CHAR * szSqlStrIn, SQLINTEGER cbSqlStrIn,
ODBC_CHAR * szSqlStr, SQLINTEGER cbSqlStrMax, SQLINTEGER FAR* pcbSqlStr, int wide);
SQLRETURN ODBC_PUBLIC ODBC_API SQLNativeSqlW(
SQLHDBC hdbc,
SQLWCHAR * szSqlStrIn, SQLINTEGER cbSqlStrIn,
SQLWCHAR * szSqlStr, SQLINTEGER cbSqlStrMax, SQLINTEGER FAR* pcbSqlStr)
{
if (TDS_UNLIKELY(tds_write_dump)) {
SQLWSTR_BUFS(1);
tdsdump_log(TDS_DBG_FUNC, "SQLNativeSqlW(%p, %ls, %d, %p, %d, %p)\n",
hdbc,
SQLWSTR(szSqlStrIn), (int) cbSqlStrIn,
szSqlStr, (int) cbSqlStrMax, pcbSqlStr);
SQLWSTR_FREE();
}
return _SQLNativeSql(hdbc,
(ODBC_CHAR*) szSqlStrIn, cbSqlStrIn,
(ODBC_CHAR*) szSqlStr, cbSqlStrMax, pcbSqlStr, 1);
}
#endif
SQLRETURN ODBC_PUBLIC ODBC_API SQLNativeSql(
SQLHDBC hdbc,
SQLCHAR * szSqlStrIn, SQLINTEGER cbSqlStrIn,
SQLCHAR * szSqlStr, SQLINTEGER cbSqlStrMax, SQLINTEGER FAR* pcbSqlStr)
{
TDSDUMP_LOG_FAST(TDS_DBG_FUNC, "SQLNativeSql(%p, %s, %d, %p, %d, %p)\n",
hdbc,
(const char*) szSqlStrIn, (int) cbSqlStrIn,
szSqlStr, (int) cbSqlStrMax, pcbSqlStr);
#ifdef ENABLE_ODBC_WIDE
return _SQLNativeSql(hdbc,
(ODBC_CHAR*) szSqlStrIn, cbSqlStrIn,
(ODBC_CHAR*) szSqlStr, cbSqlStrMax, pcbSqlStr, 0);
#else
return _SQLNativeSql(hdbc,
szSqlStrIn, cbSqlStrIn,
szSqlStr, cbSqlStrMax, pcbSqlStr);
#endif
}
#ifdef ENABLE_ODBC_WIDE
static SQLRETURN _SQLPrimaryKeys(SQLHSTMT hstmt,
ODBC_CHAR * szCatalogName, SQLSMALLINT cbCatalogName,
ODBC_CHAR * szSchemaName, SQLSMALLINT cbSchemaName,
ODBC_CHAR * szTableName, SQLSMALLINT cbTableName, int wide);
SQLRETURN ODBC_PUBLIC ODBC_API SQLPrimaryKeysW(
SQLHSTMT hstmt,
SQLWCHAR * szCatalogName, SQLSMALLINT cbCatalogName,
SQLWCHAR * szSchemaName, SQLSMALLINT cbSchemaName,
SQLWCHAR * szTableName, SQLSMALLINT cbTableName)
{
if (TDS_UNLIKELY(tds_write_dump)) {
SQLWSTR_BUFS(3);
tdsdump_log(TDS_DBG_FUNC, "SQLPrimaryKeysW(%p, %ls, %d, %ls, %d, %ls, %d)\n",
hstmt,
SQLWSTR(szCatalogName), (int) cbCatalogName,
SQLWSTR(szSchemaName), (int) cbSchemaName,
SQLWSTR(szTableName), (int) cbTableName);
SQLWSTR_FREE();
}
return _SQLPrimaryKeys(hstmt,
(ODBC_CHAR*) szCatalogName, cbCatalogName,
(ODBC_CHAR*) szSchemaName, cbSchemaName,
(ODBC_CHAR*) szTableName, cbTableName, 1);
}
#endif
SQLRETURN ODBC_PUBLIC ODBC_API SQLPrimaryKeys(
SQLHSTMT hstmt,
SQLCHAR * szCatalogName, SQLSMALLINT cbCatalogName,
SQLCHAR * szSchemaName, SQLSMALLINT cbSchemaName,
SQLCHAR * szTableName, SQLSMALLINT cbTableName)
{
TDSDUMP_LOG_FAST(TDS_DBG_FUNC, "SQLPrimaryKeys(%p, %s, %d, %s, %d, %s, %d)\n",
hstmt,
(const char*) szCatalogName, (int) cbCatalogName,
(const char*) szSchemaName, (int) cbSchemaName,
(const char*) szTableName, (int) cbTableName);
#ifdef ENABLE_ODBC_WIDE
return _SQLPrimaryKeys(hstmt,
(ODBC_CHAR*) szCatalogName, cbCatalogName,
(ODBC_CHAR*) szSchemaName, cbSchemaName,
(ODBC_CHAR*) szTableName, cbTableName, 0);
#else
return _SQLPrimaryKeys(hstmt,
szCatalogName, cbCatalogName,
szSchemaName, cbSchemaName,
szTableName, cbTableName);
#endif
}
#ifdef ENABLE_ODBC_WIDE
static SQLRETURN _SQLProcedureColumns(SQLHSTMT hstmt,
ODBC_CHAR * szCatalogName, SQLSMALLINT cbCatalogName,
ODBC_CHAR * szSchemaName, SQLSMALLINT cbSchemaName,
ODBC_CHAR * szProcName, SQLSMALLINT cbProcName,
ODBC_CHAR * szColumnName, SQLSMALLINT cbColumnName, int wide);
SQLRETURN ODBC_PUBLIC ODBC_API SQLProcedureColumnsW(
SQLHSTMT hstmt,
SQLWCHAR * szCatalogName, SQLSMALLINT cbCatalogName,
SQLWCHAR * szSchemaName, SQLSMALLINT cbSchemaName,
SQLWCHAR * szProcName, SQLSMALLINT cbProcName,
SQLWCHAR * szColumnName, SQLSMALLINT cbColumnName)
{
if (TDS_UNLIKELY(tds_write_dump)) {
SQLWSTR_BUFS(4);
tdsdump_log(TDS_DBG_FUNC, "SQLProcedureColumnsW(%p, %ls, %d, %ls, %d, %ls, %d, %ls, %d)\n",
hstmt,
SQLWSTR(szCatalogName), (int) cbCatalogName,
SQLWSTR(szSchemaName), (int) cbSchemaName,
SQLWSTR(szProcName), (int) cbProcName,
SQLWSTR(szColumnName), (int) cbColumnName);
SQLWSTR_FREE();
}
return _SQLProcedureColumns(hstmt,
(ODBC_CHAR*) szCatalogName, cbCatalogName,
(ODBC_CHAR*) szSchemaName, cbSchemaName,
(ODBC_CHAR*) szProcName, cbProcName,
(ODBC_CHAR*) szColumnName, cbColumnName, 1);
}
#endif
SQLRETURN ODBC_PUBLIC ODBC_API SQLProcedureColumns(
SQLHSTMT hstmt,
SQLCHAR * szCatalogName, SQLSMALLINT cbCatalogName,
SQLCHAR * szSchemaName, SQLSMALLINT cbSchemaName,
SQLCHAR * szProcName, SQLSMALLINT cbProcName,
SQLCHAR * szColumnName, SQLSMALLINT cbColumnName)
{
TDSDUMP_LOG_FAST(TDS_DBG_FUNC, "SQLProcedureColumns(%p, %s, %d, %s, %d, %s, %d, %s, %d)\n",
hstmt,
(const char*) szCatalogName, (int) cbCatalogName,
(const char*) szSchemaName, (int) cbSchemaName,
(const char*) szProcName, (int) cbProcName,
(const char*) szColumnName, (int) cbColumnName);
#ifdef ENABLE_ODBC_WIDE
return _SQLProcedureColumns(hstmt,
(ODBC_CHAR*) szCatalogName, cbCatalogName,
(ODBC_CHAR*) szSchemaName, cbSchemaName,
(ODBC_CHAR*) szProcName, cbProcName,
(ODBC_CHAR*) szColumnName, cbColumnName, 0);
#else
return _SQLProcedureColumns(hstmt,
szCatalogName, cbCatalogName,
szSchemaName, cbSchemaName,
szProcName, cbProcName,
szColumnName, cbColumnName);
#endif
}
#ifdef ENABLE_ODBC_WIDE
static SQLRETURN _SQLProcedures(SQLHSTMT hstmt,
ODBC_CHAR * szCatalogName, SQLSMALLINT cbCatalogName,
ODBC_CHAR * szSchemaName, SQLSMALLINT cbSchemaName,
ODBC_CHAR * szProcName, SQLSMALLINT cbProcName, int wide);
SQLRETURN ODBC_PUBLIC ODBC_API SQLProceduresW(
SQLHSTMT hstmt,
SQLWCHAR * szCatalogName, SQLSMALLINT cbCatalogName,
SQLWCHAR * szSchemaName, SQLSMALLINT cbSchemaName,
SQLWCHAR * szProcName, SQLSMALLINT cbProcName)
{
if (TDS_UNLIKELY(tds_write_dump)) {
SQLWSTR_BUFS(3);
tdsdump_log(TDS_DBG_FUNC, "SQLProceduresW(%p, %ls, %d, %ls, %d, %ls, %d)\n",
hstmt,
SQLWSTR(szCatalogName), (int) cbCatalogName,
SQLWSTR(szSchemaName), (int) cbSchemaName,
SQLWSTR(szProcName), (int) cbProcName);
SQLWSTR_FREE();
}
return _SQLProcedures(hstmt,
(ODBC_CHAR*) szCatalogName, cbCatalogName,
(ODBC_CHAR*) szSchemaName, cbSchemaName,
(ODBC_CHAR*) szProcName, cbProcName, 1);
}
#endif
SQLRETURN ODBC_PUBLIC ODBC_API SQLProcedures(
SQLHSTMT hstmt,
SQLCHAR * szCatalogName, SQLSMALLINT cbCatalogName,
SQLCHAR * szSchemaName, SQLSMALLINT cbSchemaName,
SQLCHAR * szProcName, SQLSMALLINT cbProcName)
{
TDSDUMP_LOG_FAST(TDS_DBG_FUNC, "SQLProcedures(%p, %s, %d, %s, %d, %s, %d)\n",
hstmt,
(const char*) szCatalogName, (int) cbCatalogName,
(const char*) szSchemaName, (int) cbSchemaName,
(const char*) szProcName, (int) cbProcName);
#ifdef ENABLE_ODBC_WIDE
return _SQLProcedures(hstmt,
(ODBC_CHAR*) szCatalogName, cbCatalogName,
(ODBC_CHAR*) szSchemaName, cbSchemaName,
(ODBC_CHAR*) szProcName, cbProcName, 0);
#else
return _SQLProcedures(hstmt,
szCatalogName, cbCatalogName,
szSchemaName, cbSchemaName,
szProcName, cbProcName);
#endif
}
#ifdef ENABLE_ODBC_WIDE
static SQLRETURN _SQLTablePrivileges(SQLHSTMT hstmt,
ODBC_CHAR * szCatalogName, SQLSMALLINT cbCatalogName,
ODBC_CHAR * szSchemaName, SQLSMALLINT cbSchemaName,
ODBC_CHAR * szTableName, SQLSMALLINT cbTableName, int wide);
SQLRETURN ODBC_PUBLIC ODBC_API SQLTablePrivilegesW(
SQLHSTMT hstmt,
SQLWCHAR * szCatalogName, SQLSMALLINT cbCatalogName,
SQLWCHAR * szSchemaName, SQLSMALLINT cbSchemaName,
SQLWCHAR * szTableName, SQLSMALLINT cbTableName)
{
if (TDS_UNLIKELY(tds_write_dump)) {
SQLWSTR_BUFS(3);
tdsdump_log(TDS_DBG_FUNC, "SQLTablePrivilegesW(%p, %ls, %d, %ls, %d, %ls, %d)\n",
hstmt,
SQLWSTR(szCatalogName), (int) cbCatalogName,
SQLWSTR(szSchemaName), (int) cbSchemaName,
SQLWSTR(szTableName), (int) cbTableName);
SQLWSTR_FREE();
}
return _SQLTablePrivileges(hstmt,
(ODBC_CHAR*) szCatalogName, cbCatalogName,
(ODBC_CHAR*) szSchemaName, cbSchemaName,
(ODBC_CHAR*) szTableName, cbTableName, 1);
}
#endif
SQLRETURN ODBC_PUBLIC ODBC_API SQLTablePrivileges(
SQLHSTMT hstmt,
SQLCHAR * szCatalogName, SQLSMALLINT cbCatalogName,
SQLCHAR * szSchemaName, SQLSMALLINT cbSchemaName,
SQLCHAR * szTableName, SQLSMALLINT cbTableName)
{
TDSDUMP_LOG_FAST(TDS_DBG_FUNC, "SQLTablePrivileges(%p, %s, %d, %s, %d, %s, %d)\n",
hstmt,
(const char*) szCatalogName, (int) cbCatalogName,
(const char*) szSchemaName, (int) cbSchemaName,
(const char*) szTableName, (int) cbTableName);
#ifdef ENABLE_ODBC_WIDE
return _SQLTablePrivileges(hstmt,
(ODBC_CHAR*) szCatalogName, cbCatalogName,
(ODBC_CHAR*) szSchemaName, cbSchemaName,
(ODBC_CHAR*) szTableName, cbTableName, 0);
#else
return _SQLTablePrivileges(hstmt,
szCatalogName, cbCatalogName,
szSchemaName, cbSchemaName,
szTableName, cbTableName);
#endif
}
#ifdef ENABLE_ODBC_WIDE
static SQLRETURN _SQLConnect(SQLHDBC hdbc,
ODBC_CHAR * szDSN, SQLSMALLINT cbDSN,
ODBC_CHAR * szUID, SQLSMALLINT cbUID,
ODBC_CHAR * szAuthStr, SQLSMALLINT cbAuthStr, int wide);
SQLRETURN ODBC_PUBLIC ODBC_API SQLConnectW(
SQLHDBC hdbc,
SQLWCHAR * szDSN, SQLSMALLINT cbDSN,
SQLWCHAR * szUID, SQLSMALLINT cbUID,
SQLWCHAR * szAuthStr, SQLSMALLINT cbAuthStr)
{
if (TDS_UNLIKELY(tds_write_dump)) {
SQLWSTR_BUFS(3);
tdsdump_log(TDS_DBG_FUNC, "SQLConnectW(%p, %ls, %d, %ls, %d, %ls, %d)\n",
hdbc,
SQLWSTR(szDSN), (int) cbDSN,
SQLWSTR(szUID), (int) cbUID,
SQLWSTR(szAuthStr), (int) cbAuthStr);
SQLWSTR_FREE();
}
return _SQLConnect(hdbc,
(ODBC_CHAR*) szDSN, cbDSN,
(ODBC_CHAR*) szUID, cbUID,
(ODBC_CHAR*) szAuthStr, cbAuthStr, 1);
}
#endif
SQLRETURN ODBC_PUBLIC ODBC_API SQLConnect(
SQLHDBC hdbc,
SQLCHAR * szDSN, SQLSMALLINT cbDSN,
SQLCHAR * szUID, SQLSMALLINT cbUID,
SQLCHAR * szAuthStr, SQLSMALLINT cbAuthStr)
{
TDSDUMP_LOG_FAST(TDS_DBG_FUNC, "SQLConnect(%p, %s, %d, %s, %d, %s, %d)\n",
hdbc,
(const char*) szDSN, (int) cbDSN,
(const char*) szUID, (int) cbUID,
(const char*) szAuthStr, (int) cbAuthStr);
#ifdef ENABLE_ODBC_WIDE
return _SQLConnect(hdbc,
(ODBC_CHAR*) szDSN, cbDSN,
(ODBC_CHAR*) szUID, cbUID,
(ODBC_CHAR*) szAuthStr, cbAuthStr, 0);
#else
return _SQLConnect(hdbc,
szDSN, cbDSN,
szUID, cbUID,
szAuthStr, cbAuthStr);
#endif
}
#ifdef ENABLE_ODBC_WIDE
static SQLRETURN _SQLDescribeCol(SQLHSTMT hstmt,
SQLUSMALLINT icol,
ODBC_CHAR * szColName, SQLSMALLINT cbColNameMax, SQLSMALLINT FAR* pcbColName,
SQLSMALLINT * pfSqlType,
SQLULEN * pcbColDef,
SQLSMALLINT * pibScale,
SQLSMALLINT * pfNullable, int wide);
SQLRETURN ODBC_PUBLIC ODBC_API SQLDescribeColW(
SQLHSTMT hstmt,
SQLUSMALLINT icol,
SQLWCHAR * szColName, SQLSMALLINT cbColNameMax, SQLSMALLINT FAR* pcbColName,
SQLSMALLINT * pfSqlType,
SQLULEN * pcbColDef,
SQLSMALLINT * pibScale,
SQLSMALLINT * pfNullable)
{
TDSDUMP_LOG_FAST(TDS_DBG_FUNC, "SQLDescribeColW(%p, %u, %p, %d, %p, %p, %p, %p, %p)\n",
hstmt,
(unsigned int) icol,
szColName, (int) cbColNameMax, pcbColName,
pfSqlType,
pcbColDef,
pibScale,
pfNullable);
return _SQLDescribeCol(hstmt,
icol,
(ODBC_CHAR*) szColName, cbColNameMax, pcbColName,
pfSqlType,
pcbColDef,
pibScale,
pfNullable, 1);
}
#endif
SQLRETURN ODBC_PUBLIC ODBC_API SQLDescribeCol(
SQLHSTMT hstmt,
SQLUSMALLINT icol,
SQLCHAR * szColName, SQLSMALLINT cbColNameMax, SQLSMALLINT FAR* pcbColName,
SQLSMALLINT * pfSqlType,
SQLULEN * pcbColDef,
SQLSMALLINT * pibScale,
SQLSMALLINT * pfNullable)
{
TDSDUMP_LOG_FAST(TDS_DBG_FUNC, "SQLDescribeCol(%p, %u, %p, %d, %p, %p, %p, %p, %p)\n",
hstmt,
(unsigned int) icol,
szColName, (int) cbColNameMax, pcbColName,
pfSqlType,
pcbColDef,
pibScale,
pfNullable);
#ifdef ENABLE_ODBC_WIDE
return _SQLDescribeCol(hstmt,
icol,
(ODBC_CHAR*) szColName, cbColNameMax, pcbColName,
pfSqlType,
pcbColDef,
pibScale,
pfNullable, 0);
#else
return _SQLDescribeCol(hstmt,
icol,
szColName, cbColNameMax, pcbColName,
pfSqlType,
pcbColDef,
pibScale,
pfNullable);
#endif
}
#ifdef ENABLE_ODBC_WIDE
static SQLRETURN _SQLGetDescRec(SQLHDESC hdesc,
SQLSMALLINT RecordNumber,
ODBC_CHAR * szName, SQLSMALLINT cbNameMax, SQLSMALLINT FAR* pcbName,
SQLSMALLINT * Type,
SQLSMALLINT * SubType,
SQLLEN * Length,
SQLSMALLINT * Precision,
SQLSMALLINT * Scale,
SQLSMALLINT * Nullable, int wide);
SQLRETURN ODBC_PUBLIC ODBC_API SQLGetDescRecW(
SQLHDESC hdesc,
SQLSMALLINT RecordNumber,
SQLWCHAR * szName, SQLSMALLINT cbNameMax, SQLSMALLINT FAR* pcbName,
SQLSMALLINT * Type,
SQLSMALLINT * SubType,
SQLLEN * Length,
SQLSMALLINT * Precision,
SQLSMALLINT * Scale,
SQLSMALLINT * Nullable)
{
TDSDUMP_LOG_FAST(TDS_DBG_FUNC, "SQLGetDescRecW(%p, %d, %p, %d, %p, %p, %p, %p, %p, %p, %p)\n",
hdesc,
(int) RecordNumber,
szName, (int) cbNameMax, pcbName,
Type,
SubType,
Length,
Precision,
Scale,
Nullable);
return _SQLGetDescRec(hdesc,
RecordNumber,
(ODBC_CHAR*) szName, cbNameMax, pcbName,
Type,
SubType,
Length,
Precision,
Scale,
Nullable, 1);
}
#endif
SQLRETURN ODBC_PUBLIC ODBC_API SQLGetDescRec(
SQLHDESC hdesc,
SQLSMALLINT RecordNumber,
SQLCHAR * szName, SQLSMALLINT cbNameMax, SQLSMALLINT FAR* pcbName,
SQLSMALLINT * Type,
SQLSMALLINT * SubType,
SQLLEN * Length,
SQLSMALLINT * Precision,
SQLSMALLINT * Scale,
SQLSMALLINT * Nullable)
{
TDSDUMP_LOG_FAST(TDS_DBG_FUNC, "SQLGetDescRec(%p, %d, %p, %d, %p, %p, %p, %p, %p, %p, %p)\n",
hdesc,
(int) RecordNumber,
szName, (int) cbNameMax, pcbName,
Type,
SubType,
Length,
Precision,
Scale,
Nullable);
#ifdef ENABLE_ODBC_WIDE
return _SQLGetDescRec(hdesc,
RecordNumber,
(ODBC_CHAR*) szName, cbNameMax, pcbName,
Type,
SubType,
Length,
Precision,
Scale,
Nullable, 0);
#else
return _SQLGetDescRec(hdesc,
RecordNumber,
szName, cbNameMax, pcbName,
Type,
SubType,
Length,
Precision,
Scale,
Nullable);
#endif
}
#ifdef ENABLE_ODBC_WIDE
static SQLRETURN _SQLGetDescField(SQLHDESC hdesc,
SQLSMALLINT icol,
SQLSMALLINT fDescType,
SQLPOINTER Value,
SQLINTEGER BufferLength,
SQLINTEGER * StringLength, int wide);
SQLRETURN ODBC_PUBLIC ODBC_API SQLGetDescFieldW(
SQLHDESC hdesc,
SQLSMALLINT icol,
SQLSMALLINT fDescType,
SQLPOINTER Value,
SQLINTEGER BufferLength,
SQLINTEGER * StringLength)
{
TDSDUMP_LOG_FAST(TDS_DBG_FUNC, "SQLGetDescFieldW(%p, %d, %d, %p, %d, %p)\n",
hdesc,
(int) icol,
(int) fDescType,
Value,
(int) BufferLength,
StringLength);
return _SQLGetDescField(hdesc,
icol,
fDescType,
Value,
BufferLength,
StringLength, 1);
}
#endif
SQLRETURN ODBC_PUBLIC ODBC_API SQLGetDescField(
SQLHDESC hdesc,
SQLSMALLINT icol,
SQLSMALLINT fDescType,
SQLPOINTER Value,
SQLINTEGER BufferLength,
SQLINTEGER * StringLength)
{
TDSDUMP_LOG_FAST(TDS_DBG_FUNC, "SQLGetDescField(%p, %d, %d, %p, %d, %p)\n",
hdesc,
(int) icol,
(int) fDescType,
Value,
(int) BufferLength,
StringLength);
#ifdef ENABLE_ODBC_WIDE
return _SQLGetDescField(hdesc,
icol,
fDescType,
Value,
BufferLength,
StringLength, 0);
#else
return _SQLGetDescField(hdesc,
icol,
fDescType,
Value,
BufferLength,
StringLength);
#endif
}
#ifdef ENABLE_ODBC_WIDE
static SQLRETURN _SQLSetDescField(SQLHDESC hdesc,
SQLSMALLINT icol,
SQLSMALLINT fDescType,
SQLPOINTER Value,
SQLINTEGER BufferLength, int wide);
SQLRETURN ODBC_PUBLIC ODBC_API SQLSetDescFieldW(
SQLHDESC hdesc,
SQLSMALLINT icol,
SQLSMALLINT fDescType,
SQLPOINTER Value,
SQLINTEGER BufferLength)
{
TDSDUMP_LOG_FAST(TDS_DBG_FUNC, "SQLSetDescFieldW(%p, %d, %d, %p, %d)\n",
hdesc,
(int) icol,
(int) fDescType,
Value,
(int) BufferLength);
return _SQLSetDescField(hdesc,
icol,
fDescType,
Value,
BufferLength, 1);
}
#endif
SQLRETURN ODBC_PUBLIC ODBC_API SQLSetDescField(
SQLHDESC hdesc,
SQLSMALLINT icol,
SQLSMALLINT fDescType,
SQLPOINTER Value,
SQLINTEGER BufferLength)
{
TDSDUMP_LOG_FAST(TDS_DBG_FUNC, "SQLSetDescField(%p, %d, %d, %p, %d)\n",
hdesc,
(int) icol,
(int) fDescType,
Value,
(int) BufferLength);
#ifdef ENABLE_ODBC_WIDE
return _SQLSetDescField(hdesc,
icol,
fDescType,
Value,
BufferLength, 0);
#else
return _SQLSetDescField(hdesc,
icol,
fDescType,
Value,
BufferLength);
#endif
}
#ifdef ENABLE_ODBC_WIDE
static SQLRETURN _SQLExecDirect(SQLHSTMT hstmt,
ODBC_CHAR * szSqlStr, SQLINTEGER cbSqlStr, int wide);
SQLRETURN ODBC_PUBLIC ODBC_API SQLExecDirectW(
SQLHSTMT hstmt,
SQLWCHAR * szSqlStr, SQLINTEGER cbSqlStr)
{
if (TDS_UNLIKELY(tds_write_dump)) {
SQLWSTR_BUFS(1);
tdsdump_log(TDS_DBG_FUNC, "SQLExecDirectW(%p, %ls, %d)\n",
hstmt,
SQLWSTR(szSqlStr), (int) cbSqlStr);
SQLWSTR_FREE();
}
return _SQLExecDirect(hstmt,
(ODBC_CHAR*) szSqlStr, cbSqlStr, 1);
}
#endif
SQLRETURN ODBC_PUBLIC ODBC_API SQLExecDirect(
SQLHSTMT hstmt,
SQLCHAR * szSqlStr, SQLINTEGER cbSqlStr)
{
TDSDUMP_LOG_FAST(TDS_DBG_FUNC, "SQLExecDirect(%p, %s, %d)\n",
hstmt,
(const char*) szSqlStr, (int) cbSqlStr);
#ifdef ENABLE_ODBC_WIDE
return _SQLExecDirect(hstmt,
(ODBC_CHAR*) szSqlStr, cbSqlStr, 0);
#else
return _SQLExecDirect(hstmt,
szSqlStr, cbSqlStr);
#endif
}
#ifdef ENABLE_ODBC_WIDE
static SQLRETURN _SQLPrepare(SQLHSTMT hstmt,
ODBC_CHAR * szSqlStr, SQLINTEGER cbSqlStr, int wide);
SQLRETURN ODBC_PUBLIC ODBC_API SQLPrepareW(
SQLHSTMT hstmt,
SQLWCHAR * szSqlStr, SQLINTEGER cbSqlStr)
{
if (TDS_UNLIKELY(tds_write_dump)) {
SQLWSTR_BUFS(1);
tdsdump_log(TDS_DBG_FUNC, "SQLPrepareW(%p, %ls, %d)\n",
hstmt,
SQLWSTR(szSqlStr), (int) cbSqlStr);
SQLWSTR_FREE();
}
return _SQLPrepare(hstmt,
(ODBC_CHAR*) szSqlStr, cbSqlStr, 1);
}
#endif
SQLRETURN ODBC_PUBLIC ODBC_API SQLPrepare(
SQLHSTMT hstmt,
SQLCHAR * szSqlStr, SQLINTEGER cbSqlStr)
{
TDSDUMP_LOG_FAST(TDS_DBG_FUNC, "SQLPrepare(%p, %s, %d)\n",
hstmt,
(const char*) szSqlStr, (int) cbSqlStr);
#ifdef ENABLE_ODBC_WIDE
return _SQLPrepare(hstmt,
(ODBC_CHAR*) szSqlStr, cbSqlStr, 0);
#else
return _SQLPrepare(hstmt,
szSqlStr, cbSqlStr);
#endif
}
#ifdef ENABLE_ODBC_WIDE
static SQLRETURN _SQLSetCursorName(SQLHSTMT hstmt,
ODBC_CHAR * szCursor, SQLSMALLINT cbCursor, int wide);
SQLRETURN ODBC_PUBLIC ODBC_API SQLSetCursorNameW(
SQLHSTMT hstmt,
SQLWCHAR * szCursor, SQLSMALLINT cbCursor)
{
if (TDS_UNLIKELY(tds_write_dump)) {
SQLWSTR_BUFS(1);
tdsdump_log(TDS_DBG_FUNC, "SQLSetCursorNameW(%p, %ls, %d)\n",
hstmt,
SQLWSTR(szCursor), (int) cbCursor);
SQLWSTR_FREE();
}
return _SQLSetCursorName(hstmt,
(ODBC_CHAR*) szCursor, cbCursor, 1);
}
#endif
SQLRETURN ODBC_PUBLIC ODBC_API SQLSetCursorName(
SQLHSTMT hstmt,
SQLCHAR * szCursor, SQLSMALLINT cbCursor)
{
TDSDUMP_LOG_FAST(TDS_DBG_FUNC, "SQLSetCursorName(%p, %s, %d)\n",
hstmt,
(const char*) szCursor, (int) cbCursor);
#ifdef ENABLE_ODBC_WIDE
return _SQLSetCursorName(hstmt,
(ODBC_CHAR*) szCursor, cbCursor, 0);
#else
return _SQLSetCursorName(hstmt,
szCursor, cbCursor);
#endif
}
#ifdef ENABLE_ODBC_WIDE
static SQLRETURN _SQLGetCursorName(SQLHSTMT hstmt,
ODBC_CHAR * szCursor, SQLSMALLINT cbCursorMax, SQLSMALLINT FAR* pcbCursor, int wide);
SQLRETURN ODBC_PUBLIC ODBC_API SQLGetCursorNameW(
SQLHSTMT hstmt,
SQLWCHAR * szCursor, SQLSMALLINT cbCursorMax, SQLSMALLINT FAR* pcbCursor)
{
TDSDUMP_LOG_FAST(TDS_DBG_FUNC, "SQLGetCursorNameW(%p, %p, %d, %p)\n",
hstmt,
szCursor, (int) cbCursorMax, pcbCursor);
return _SQLGetCursorName(hstmt,
(ODBC_CHAR*) szCursor, cbCursorMax, pcbCursor, 1);
}
#endif
SQLRETURN ODBC_PUBLIC ODBC_API SQLGetCursorName(
SQLHSTMT hstmt,
SQLCHAR * szCursor, SQLSMALLINT cbCursorMax, SQLSMALLINT FAR* pcbCursor)
{
TDSDUMP_LOG_FAST(TDS_DBG_FUNC, "SQLGetCursorName(%p, %p, %d, %p)\n",
hstmt,
szCursor, (int) cbCursorMax, pcbCursor);
#ifdef ENABLE_ODBC_WIDE
return _SQLGetCursorName(hstmt,
(ODBC_CHAR*) szCursor, cbCursorMax, pcbCursor, 0);
#else
return _SQLGetCursorName(hstmt,
szCursor, cbCursorMax, pcbCursor);
#endif
}
#ifdef ENABLE_ODBC_WIDE
static SQLRETURN _SQLColumns(SQLHSTMT hstmt,
ODBC_CHAR * szCatalogName, SQLSMALLINT cbCatalogName,
ODBC_CHAR * szSchemaName, SQLSMALLINT cbSchemaName,
ODBC_CHAR * szTableName, SQLSMALLINT cbTableName,
ODBC_CHAR * szColumnName, SQLSMALLINT cbColumnName, int wide);
SQLRETURN ODBC_PUBLIC ODBC_API SQLColumnsW(
SQLHSTMT hstmt,
SQLWCHAR * szCatalogName, SQLSMALLINT cbCatalogName,
SQLWCHAR * szSchemaName, SQLSMALLINT cbSchemaName,
SQLWCHAR * szTableName, SQLSMALLINT cbTableName,
SQLWCHAR * szColumnName, SQLSMALLINT cbColumnName)
{
if (TDS_UNLIKELY(tds_write_dump)) {
SQLWSTR_BUFS(4);
tdsdump_log(TDS_DBG_FUNC, "SQLColumnsW(%p, %ls, %d, %ls, %d, %ls, %d, %ls, %d)\n",
hstmt,
SQLWSTR(szCatalogName), (int) cbCatalogName,
SQLWSTR(szSchemaName), (int) cbSchemaName,
SQLWSTR(szTableName), (int) cbTableName,
SQLWSTR(szColumnName), (int) cbColumnName);
SQLWSTR_FREE();
}
return _SQLColumns(hstmt,
(ODBC_CHAR*) szCatalogName, cbCatalogName,
(ODBC_CHAR*) szSchemaName, cbSchemaName,
(ODBC_CHAR*) szTableName, cbTableName,
(ODBC_CHAR*) szColumnName, cbColumnName, 1);
}
#endif
SQLRETURN ODBC_PUBLIC ODBC_API SQLColumns(
SQLHSTMT hstmt,
SQLCHAR * szCatalogName, SQLSMALLINT cbCatalogName,
SQLCHAR * szSchemaName, SQLSMALLINT cbSchemaName,
SQLCHAR * szTableName, SQLSMALLINT cbTableName,
SQLCHAR * szColumnName, SQLSMALLINT cbColumnName)
{
TDSDUMP_LOG_FAST(TDS_DBG_FUNC, "SQLColumns(%p, %s, %d, %s, %d, %s, %d, %s, %d)\n",
hstmt,
(const char*) szCatalogName, (int) cbCatalogName,
(const char*) szSchemaName, (int) cbSchemaName,
(const char*) szTableName, (int) cbTableName,
(const char*) szColumnName, (int) cbColumnName);
#ifdef ENABLE_ODBC_WIDE
return _SQLColumns(hstmt,
(ODBC_CHAR*) szCatalogName, cbCatalogName,
(ODBC_CHAR*) szSchemaName, cbSchemaName,
(ODBC_CHAR*) szTableName, cbTableName,
(ODBC_CHAR*) szColumnName, cbColumnName, 0);
#else
return _SQLColumns(hstmt,
szCatalogName, cbCatalogName,
szSchemaName, cbSchemaName,
szTableName, cbTableName,
szColumnName, cbColumnName);
#endif
}
#ifdef ENABLE_ODBC_WIDE
static SQLRETURN _SQLGetConnectAttr(SQLHDBC hdbc,
SQLINTEGER Attribute,
SQLPOINTER Value,
SQLINTEGER BufferLength,
SQLINTEGER * StringLength, int wide);
SQLRETURN ODBC_PUBLIC ODBC_API SQLGetConnectAttrW(
SQLHDBC hdbc,
SQLINTEGER Attribute,
SQLPOINTER Value,
SQLINTEGER BufferLength,
SQLINTEGER * StringLength)
{
TDSDUMP_LOG_FAST(TDS_DBG_FUNC, "SQLGetConnectAttrW(%p, %d, %p, %d, %p)\n",
hdbc,
(int) Attribute,
Value,
(int) BufferLength,
StringLength);
return _SQLGetConnectAttr(hdbc,
Attribute,
Value,
BufferLength,
StringLength, 1);
}
#endif
SQLRETURN ODBC_PUBLIC ODBC_API SQLGetConnectAttr(
SQLHDBC hdbc,
SQLINTEGER Attribute,
SQLPOINTER Value,
SQLINTEGER BufferLength,
SQLINTEGER * StringLength)
{
TDSDUMP_LOG_FAST(TDS_DBG_FUNC, "SQLGetConnectAttr(%p, %d, %p, %d, %p)\n",
hdbc,
(int) Attribute,
Value,
(int) BufferLength,
StringLength);
#ifdef ENABLE_ODBC_WIDE
return _SQLGetConnectAttr(hdbc,
Attribute,
Value,
BufferLength,
StringLength, 0);
#else
return _SQLGetConnectAttr(hdbc,
Attribute,
Value,
BufferLength,
StringLength);
#endif
}
#ifdef ENABLE_ODBC_WIDE
static SQLRETURN _SQLSetConnectAttr(SQLHDBC hdbc,
SQLINTEGER Attribute,
SQLPOINTER ValuePtr,
SQLINTEGER StringLength, int wide);
SQLRETURN ODBC_PUBLIC ODBC_API SQLSetConnectAttrW(
SQLHDBC hdbc,
SQLINTEGER Attribute,
SQLPOINTER ValuePtr,
SQLINTEGER StringLength)
{
TDSDUMP_LOG_FAST(TDS_DBG_FUNC, "SQLSetConnectAttrW(%p, %d, %p, %d)\n",
hdbc,
(int) Attribute,
ValuePtr,
(int) StringLength);
return _SQLSetConnectAttr(hdbc,
Attribute,
ValuePtr,
StringLength, 1);
}
#endif
SQLRETURN ODBC_PUBLIC ODBC_API SQLSetConnectAttr(
SQLHDBC hdbc,
SQLINTEGER Attribute,
SQLPOINTER ValuePtr,
SQLINTEGER StringLength)
{
TDSDUMP_LOG_FAST(TDS_DBG_FUNC, "SQLSetConnectAttr(%p, %d, %p, %d)\n",
hdbc,
(int) Attribute,
ValuePtr,
(int) StringLength);
#ifdef ENABLE_ODBC_WIDE
return _SQLSetConnectAttr(hdbc,
Attribute,
ValuePtr,
StringLength, 0);
#else
return _SQLSetConnectAttr(hdbc,
Attribute,
ValuePtr,
StringLength);
#endif
}
#ifdef ENABLE_ODBC_WIDE
static SQLRETURN _SQLSpecialColumns(SQLHSTMT hstmt,
SQLUSMALLINT fColType,
ODBC_CHAR * szCatalogName, SQLSMALLINT cbCatalogName,
ODBC_CHAR * szSchemaName, SQLSMALLINT cbSchemaName,
ODBC_CHAR * szTableName, SQLSMALLINT cbTableName,
SQLUSMALLINT fScope,
SQLUSMALLINT fNullable, int wide);
SQLRETURN ODBC_PUBLIC ODBC_API SQLSpecialColumnsW(
SQLHSTMT hstmt,
SQLUSMALLINT fColType,
SQLWCHAR * szCatalogName, SQLSMALLINT cbCatalogName,
SQLWCHAR * szSchemaName, SQLSMALLINT cbSchemaName,
SQLWCHAR * szTableName, SQLSMALLINT cbTableName,
SQLUSMALLINT fScope,
SQLUSMALLINT fNullable)
{
if (TDS_UNLIKELY(tds_write_dump)) {
SQLWSTR_BUFS(3);
tdsdump_log(TDS_DBG_FUNC, "SQLSpecialColumnsW(%p, %u, %ls, %d, %ls, %d, %ls, %d, %u, %u)\n",
hstmt,
(unsigned int) fColType,
SQLWSTR(szCatalogName), (int) cbCatalogName,
SQLWSTR(szSchemaName), (int) cbSchemaName,
SQLWSTR(szTableName), (int) cbTableName,
(unsigned int) fScope,
(unsigned int) fNullable);
SQLWSTR_FREE();
}
return _SQLSpecialColumns(hstmt,
fColType,
(ODBC_CHAR*) szCatalogName, cbCatalogName,
(ODBC_CHAR*) szSchemaName, cbSchemaName,
(ODBC_CHAR*) szTableName, cbTableName,
fScope,
fNullable, 1);
}
#endif
SQLRETURN ODBC_PUBLIC ODBC_API SQLSpecialColumns(
SQLHSTMT hstmt,
SQLUSMALLINT fColType,
SQLCHAR * szCatalogName, SQLSMALLINT cbCatalogName,
SQLCHAR * szSchemaName, SQLSMALLINT cbSchemaName,
SQLCHAR * szTableName, SQLSMALLINT cbTableName,
SQLUSMALLINT fScope,
SQLUSMALLINT fNullable)
{
TDSDUMP_LOG_FAST(TDS_DBG_FUNC, "SQLSpecialColumns(%p, %u, %s, %d, %s, %d, %s, %d, %u, %u)\n",
hstmt,
(unsigned int) fColType,
(const char*) szCatalogName, (int) cbCatalogName,
(const char*) szSchemaName, (int) cbSchemaName,
(const char*) szTableName, (int) cbTableName,
(unsigned int) fScope,
(unsigned int) fNullable);
#ifdef ENABLE_ODBC_WIDE
return _SQLSpecialColumns(hstmt,
fColType,
(ODBC_CHAR*) szCatalogName, cbCatalogName,
(ODBC_CHAR*) szSchemaName, cbSchemaName,
(ODBC_CHAR*) szTableName, cbTableName,
fScope,
fNullable, 0);
#else
return _SQLSpecialColumns(hstmt,
fColType,
szCatalogName, cbCatalogName,
szSchemaName, cbSchemaName,
szTableName, cbTableName,
fScope,
fNullable);
#endif
}
#ifdef ENABLE_ODBC_WIDE
static SQLRETURN _SQLStatistics(SQLHSTMT hstmt,
ODBC_CHAR * szCatalogName, SQLSMALLINT cbCatalogName,
ODBC_CHAR * szSchemaName, SQLSMALLINT cbSchemaName,
ODBC_CHAR * szTableName, SQLSMALLINT cbTableName,
SQLUSMALLINT fUnique,
SQLUSMALLINT fAccuracy, int wide);
SQLRETURN ODBC_PUBLIC ODBC_API SQLStatisticsW(
SQLHSTMT hstmt,
SQLWCHAR * szCatalogName, SQLSMALLINT cbCatalogName,
SQLWCHAR * szSchemaName, SQLSMALLINT cbSchemaName,
SQLWCHAR * szTableName, SQLSMALLINT cbTableName,
SQLUSMALLINT fUnique,
SQLUSMALLINT fAccuracy)
{
if (TDS_UNLIKELY(tds_write_dump)) {
SQLWSTR_BUFS(3);
tdsdump_log(TDS_DBG_FUNC, "SQLStatisticsW(%p, %ls, %d, %ls, %d, %ls, %d, %u, %u)\n",
hstmt,
SQLWSTR(szCatalogName), (int) cbCatalogName,
SQLWSTR(szSchemaName), (int) cbSchemaName,
SQLWSTR(szTableName), (int) cbTableName,
(unsigned int) fUnique,
(unsigned int) fAccuracy);
SQLWSTR_FREE();
}
return _SQLStatistics(hstmt,
(ODBC_CHAR*) szCatalogName, cbCatalogName,
(ODBC_CHAR*) szSchemaName, cbSchemaName,
(ODBC_CHAR*) szTableName, cbTableName,
fUnique,
fAccuracy, 1);
}
#endif
SQLRETURN ODBC_PUBLIC ODBC_API SQLStatistics(
SQLHSTMT hstmt,
SQLCHAR * szCatalogName, SQLSMALLINT cbCatalogName,
SQLCHAR * szSchemaName, SQLSMALLINT cbSchemaName,
SQLCHAR * szTableName, SQLSMALLINT cbTableName,
SQLUSMALLINT fUnique,
SQLUSMALLINT fAccuracy)
{
TDSDUMP_LOG_FAST(TDS_DBG_FUNC, "SQLStatistics(%p, %s, %d, %s, %d, %s, %d, %u, %u)\n",
hstmt,
(const char*) szCatalogName, (int) cbCatalogName,
(const char*) szSchemaName, (int) cbSchemaName,
(const char*) szTableName, (int) cbTableName,
(unsigned int) fUnique,
(unsigned int) fAccuracy);
#ifdef ENABLE_ODBC_WIDE
return _SQLStatistics(hstmt,
(ODBC_CHAR*) szCatalogName, cbCatalogName,
(ODBC_CHAR*) szSchemaName, cbSchemaName,
(ODBC_CHAR*) szTableName, cbTableName,
fUnique,
fAccuracy, 0);
#else
return _SQLStatistics(hstmt,
szCatalogName, cbCatalogName,
szSchemaName, cbSchemaName,
szTableName, cbTableName,
fUnique,
fAccuracy);
#endif
}
#ifdef ENABLE_ODBC_WIDE
static SQLRETURN _SQLTables(SQLHSTMT hstmt,
ODBC_CHAR * szCatalogName, SQLSMALLINT cbCatalogName,
ODBC_CHAR * szSchemaName, SQLSMALLINT cbSchemaName,
ODBC_CHAR * szTableName, SQLSMALLINT cbTableName,
ODBC_CHAR * szTableType, SQLSMALLINT cbTableType, int wide);
SQLRETURN ODBC_PUBLIC ODBC_API SQLTablesW(
SQLHSTMT hstmt,
SQLWCHAR * szCatalogName, SQLSMALLINT cbCatalogName,
SQLWCHAR * szSchemaName, SQLSMALLINT cbSchemaName,
SQLWCHAR * szTableName, SQLSMALLINT cbTableName,
SQLWCHAR * szTableType, SQLSMALLINT cbTableType)
{
if (TDS_UNLIKELY(tds_write_dump)) {
SQLWSTR_BUFS(4);
tdsdump_log(TDS_DBG_FUNC, "SQLTablesW(%p, %ls, %d, %ls, %d, %ls, %d, %ls, %d)\n",
hstmt,
SQLWSTR(szCatalogName), (int) cbCatalogName,
SQLWSTR(szSchemaName), (int) cbSchemaName,
SQLWSTR(szTableName), (int) cbTableName,
SQLWSTR(szTableType), (int) cbTableType);
SQLWSTR_FREE();
}
return _SQLTables(hstmt,
(ODBC_CHAR*) szCatalogName, cbCatalogName,
(ODBC_CHAR*) szSchemaName, cbSchemaName,
(ODBC_CHAR*) szTableName, cbTableName,
(ODBC_CHAR*) szTableType, cbTableType, 1);
}
#endif
SQLRETURN ODBC_PUBLIC ODBC_API SQLTables(
SQLHSTMT hstmt,
SQLCHAR * szCatalogName, SQLSMALLINT cbCatalogName,
SQLCHAR * szSchemaName, SQLSMALLINT cbSchemaName,
SQLCHAR * szTableName, SQLSMALLINT cbTableName,
SQLCHAR * szTableType, SQLSMALLINT cbTableType)
{
TDSDUMP_LOG_FAST(TDS_DBG_FUNC, "SQLTables(%p, %s, %d, %s, %d, %s, %d, %s, %d)\n",
hstmt,
(const char*) szCatalogName, (int) cbCatalogName,
(const char*) szSchemaName, (int) cbSchemaName,
(const char*) szTableName, (int) cbTableName,
(const char*) szTableType, (int) cbTableType);
#ifdef ENABLE_ODBC_WIDE
return _SQLTables(hstmt,
(ODBC_CHAR*) szCatalogName, cbCatalogName,
(ODBC_CHAR*) szSchemaName, cbSchemaName,
(ODBC_CHAR*) szTableName, cbTableName,
(ODBC_CHAR*) szTableType, cbTableType, 0);
#else
return _SQLTables(hstmt,
szCatalogName, cbCatalogName,
szSchemaName, cbSchemaName,
szTableName, cbTableName,
szTableType, cbTableType);
#endif
}
#define tdsdump_log TDSDUMP_LOG_FAST
tds_dynamic
Holds information for a dynamic (also called prepared) query.
Definition: tds.h:981
tds_dstr_init
static void tds_dstr_init(DSTR *s)
init a string with empty
Definition: string.h:53
tds_submit_unprepare
TDSRET tds_submit_unprepare(TDSSOCKET *tds, TDSDYNAMIC *dyn)
Send a unprepare request for a prepared query.
Definition: query.c:1797
_hdbc
Definition: odbc.h:275
_hdbc::stmt_list
struct _hstmt * stmt_list
list of all statements allocated from this connection
Definition: odbc.h:295
tds_dstr_empty
#define tds_dstr_empty(s)
Make a string empty.
Definition: string.h:91
tds_cursor::cursor_rows
TDS_INT cursor_rows
< number of updatable columns
Definition: tds.h:955
tds_deferred_cursor_dealloc
TDSRET tds_deferred_cursor_dealloc(TDSCONNECTION *conn, TDSCURSOR *cursor)
Deallocate cursor on idle.
Definition: query.c:3057
_drecord
Definition: odbc.h:163
tds_set_param_type
void tds_set_param_type(TDSCONNECTION *conn, TDSCOLUMN *curcol, TDS_SERVER_TYPE type)
Set type of column initializing all dependency.
Definition: data.c:246
tds_set_state
TDS_STATE tds_set_state(TDSSOCKET *tds, TDS_STATE state)
Set state of TDS connection, with logging and checking.
Definition: util.c:58
tds_cursor::status
TDS_CURSOR_STATUS status
cursor parameter
Definition: tds.h:957
tds_submit_query_params
TDSRET tds_submit_query_params(TDSSOCKET *tds, const char *query, TDSPARAMINFO *params, TDSHEADERS *head)
Sends a language string to the database server for processing.
Definition: query.c:350
tds_dstr_cstr
static const char * tds_dstr_cstr(const DSTR *s)
Returns a C version (NUL terminated string) of dstr.
Definition: string.h:78
odbc_rdbms_version
void odbc_rdbms_version(TDSSOCKET *tds, char *pversion_string)
Returns the version of the RDBMS in the ODBC format.
Definition: odbc_util.c:852
TDS_DONE_COUNT
@ TDS_DONE_COUNT
count field in packet is valid
Definition: tds.h:256
tds_login::password
DSTR password
password of account login
Definition: tds.h:537
_hstmt::next
struct _hstmt * next
next in list
Definition: odbc.h:392
TDS_IS_SYBASE
#define TDS_IS_SYBASE(x)
Check if product is Sybase (such as Adaptive Server Enterrprice).
Definition: tds.h:1724
odbc_set_concise_sql_type
SQLRETURN odbc_set_concise_sql_type(SQLSMALLINT concise_type, struct _drecord *drec, int check_only)
Set concise type and all cascading field.
Definition: odbc_util.c:976
_hdesc
Definition: odbc.h:204
tds_dstr_isempty
static int tds_dstr_isempty(const DSTR *s)
test if string is empty
Definition: string.h:60
_hstmt::param_count
unsigned int param_count
number of parameter in current query
Definition: odbc.h:418
tds_cursor
Holds informations about a cursor.
Definition: tds.h:941
tds_init_login
TDSLOGIN * tds_init_login(TDSLOGIN *login, TDSLOCALE *locale)
Initialize login structure with locale information and other stuff for connection.
Definition: mem.c:800
tds_get_conversion_type
TDS_SERVER_TYPE tds_get_conversion_type(TDS_SERVER_TYPE srctype, int colsize)
Return type suitable for conversions (convert all nullable types to fixed type)
Definition: tds_types.h:125
_hdbc::current_statement
struct _hstmt * current_statement
Statement executing.
Definition: odbc.h:293
tds_connection::product_version
TDS_UINT product_version
version of product (Sybase/MS and full version)
Definition: tds.h:1097
tds_cursor::cursor_id
TDS_INT cursor_id
cursor id returned by the server after cursor declare
Definition: tds.h:945
tds_fix_login
void tds_fix_login(TDSLOGIN *login)
Fix configuration after reading it.
Definition: config.c:285
_hdbc::cursor_support
unsigned int cursor_support
<>0 if server handle cursors
Definition: odbc.h:300
tds_canonical_charset
int tds_canonical_charset(const char *charset_name)
Determine canonical iconv character set.
Definition: iconv.c:976
tds_socket::rows_affected
TDS_INT8 rows_affected
rows updated/deleted/inserted/selected, TDS_NO_COUNT if not valid
Definition: tds.h:1258
tds_column::column_prec
TDS_TINYINT column_prec
precision for decimal/numeric
Definition: tds.h:707
func_info
Definition: native.c:348
tds_close_socket
void tds_close_socket(TDSSOCKET *tds)
Close current socket.
Definition: net.c:548
tds_skip_quoted
const char * tds_skip_quoted(const char *s)
Skip quoting string (like 'sfsf', "dflkdj" or [dfkjd])
Definition: query.c:515
tds_cursor_dealloc
TDSRET tds_cursor_dealloc(TDSSOCKET *tds, TDSCURSOR *cursor)
Send a deallocation request to server.
Definition: query.c:3006
tds_iconv_get_info
TDSICONV * tds_iconv_get_info(TDSCONNECTION *conn, int canonic_client, int canonic_server)
Get a iconv info structure, allocate and initialize if needed.
Definition: iconv.c:764
tds_dynamic::emulated
TDS_TINYINT emulated
this dynamic query cannot be prepared so libTDS have to construct a simple query.
Definition: tds.h:997
tds_process_cancel
TDSRET tds_process_cancel(TDSSOCKET *tds)
Definition: token.c:2554
tds_process_simple_query
TDSRET tds_process_simple_query(TDSSOCKET *tds)
Process results for simple query as "SET TEXTSIZE" or "USE dbname" If the statement returns results,...
Definition: token.c:881
bcp_bind
RETCODE bcp_bind(DBPROCESS *dbproc, BYTE *varaddr, int prefixlen, DBINT varlen, BYTE *terminator, int termlen, int db_vartype, int table_column)
Bind a program host variable to a database column.
Definition: bcp.c:2079
tds_dstr_copyn
DSTR * tds_dstr_copyn(DSTR *s, const char *src, size_t length)
Set string to a given buffer of characters.
Definition: tdsstring.c:77
_hstmt::row_status
TDS_ODBC_ROW_STATUS row_status
status of row, it can happen that this flag mark that we are still parsing row, this it's normal
Definition: odbc.h:423
_hstmt::prepared_pos
size_t prepared_pos
position in prepared query to check parameters, used only in RPC
Definition: odbc.h:413
tds_dynamic::params
TDSPARAMINFO * params
query parameters.
Definition: tds.h:1011
tds_dstr_dup
DSTR * tds_dstr_dup(DSTR *s, const DSTR *src)
Duplicate a string from another dynamic string.
Definition: tdsstring.c:134
tds_submit_begin_tran
TDSRET tds_submit_begin_tran(TDSSOCKET *tds)
Send a rollback request.
Definition: query.c:3665
bcp_control
RETCODE bcp_control(DBPROCESS *dbproc, int field, DBINT value)
Set BCP options for uploading a datafile.
Definition: bcp.c:544
tds_cursor::type
TDS_INT type
row fetched from this cursor
Definition: tds.h:960
tds_quote_id_rpc
size_t tds_quote_id_rpc(TDSSOCKET *tds, char *buffer, const char *id, int idlen)
Quote an id for a RPC call.
Definition: query.c:2216
tds_dstr_setlen
DSTR * tds_dstr_setlen(DSTR *s, size_t length)
limit length of string, MUST be <= current length
Definition: tdsstring.c:145
tagSS_TIME2_STRUCT
Definition: odbcss.h:132
tds_message
Definition: tds.h:880
tds_dstr_set
DSTR * tds_dstr_set(DSTR *s, char *src)
set a string from another buffer.
Definition: tdsstring.c:107
_hstmt::param_num
int param_num
last valid parameter in params, it's a ODBC index (from 1 relative to descriptor)
Definition: odbc.h:411
tds_send_cancel
TDSRET tds_send_cancel(TDSSOCKET *tds)
tds_send_cancel() sends an empty packet (8 byte header only) tds_process_cancel should be called dire...
Definition: query.c:2026
_hdbc::uad
TDS_DESC * uad[TDS_MAX_APP_DESC]
descriptors associated to connection
Definition: odbc.h:298
tds_column
Metadata about columns in regular and compute rows.
Definition: tds.h:693
_hstmt
Definition: odbc.h:381
tds71_submit_prepexec
TDSRET tds71_submit_prepexec(TDSSOCKET *tds, const char *query, const char *id, TDSDYNAMIC **dyn_out, TDSPARAMINFO *params)
Creates a temporary stored procedure in the server and execute it.
Definition: query.c:1401
_hstmt::row_count
TDS_INT8 row_count
row count to return
Definition: odbc.h:421
TDS_MS_VER
#define TDS_MS_VER(maj, min, x)
Calc a version number for mssql.
Definition: tds.h:1731
tds_skip_comment
const char * tds_skip_comment(const char *s)
Skip a comment in a query.
Definition: query.c:490
tds_connection::s
TDS_SYS_SOCKET s
tcp socket, INVALID_SOCKET if not connected
Definition: tds.h:1100
_hstmt::query
DSTR query
query to execute
Definition: odbc.h:387
tds_socket::in_cancel
volatile unsigned char in_cancel
indicate we are waiting a cancel reply; discard tokens till acknowledge; 1 mean we have to send cance...
Definition: tds.h:1252
tds_submit_query
TDSRET tds_submit_query(TDSSOCKET *tds, const char *query)
Sends a language string to the database server for processing.
Definition: query.c:210
tds_blob
Information about blobs (e.g.
Definition: tds.h:597
_hchk
Definition: odbc.h:230
tds_login::new_password
DSTR new_password
new password to set (TDS 7.2+)
Definition: tds.h:538
tds_multiple
Definition: tds.h:1023
tds_dstr
Structure to hold a string.
Definition: string.h:36
tds_result_info
Hold information for any results.
Definition: tds.h:773
tds_alloc_param_result
TDSPARAMINFO * tds_alloc_param_result(TDSPARAMINFO *old_param)
Adds a output parameter to TDSPARAMINFO.
Definition: mem.c:284
tds_socket::current_results
TDSRESULTINFO * current_results
Current query information.
Definition: tds.h:1242
tds_alloc_param_data
void * tds_alloc_param_data(TDSCOLUMN *curparam)
Allocate data for a parameter.
Definition: mem.c:364
bcp_done
DBINT bcp_done(DBPROCESS *dbproc)
Conclude the transfer of data from program variables.
Definition: bcp.c:2037
tds_submit_execute
TDSRET tds_submit_execute(TDSSOCKET *tds, TDSDYNAMIC *dyn)
Sends a previously prepared dynamic statement to the server.
Definition: query.c:1630
tds_free_input_params
void tds_free_input_params(TDSDYNAMIC *dyn)
Frees all allocated input parameters of a dynamic statement.
Definition: mem.c:206
tds_login::server_name
DSTR server_name
server name (in freetds.conf)
Definition: tds.h:520
tds_column::column_size
TDS_INT column_size
maximun size of data.
Definition: tds.h:698
tds_dstr_alloc
DSTR * tds_dstr_alloc(DSTR *s, size_t length)
allocate space for length char
Definition: tdsstring.c:165
tds_submit_execdirect
TDSRET tds_submit_execdirect(TDSSOCKET *tds, const char *query, TDSPARAMINFO *params, TDSHEADERS *head)
Submit a prepared query with parameters.
Definition: query.c:1256
_hstmt::need_reprepare
unsigned need_reprepare
Prepared statement needs to be prepared again.
Definition: odbc.h:404
tds_column::column_cur_size
TDS_INT column_cur_size
size written in variable (ie: char, text, binary).
Definition: tds.h:740
tds_column::char_conv
TDSICONV * char_conv
refers to previously allocated iconv information
Definition: tds.h:716
tds_needs_unprepare
int tds_needs_unprepare(TDSCONNECTION *conn, TDSDYNAMIC *dyn)
Check if dynamic request must be unprepared.
Definition: query.c:1752
bcp_colptr
RETCODE bcp_colptr(DBPROCESS *dbproc, BYTE *colptr, int table_column)
Override bcp_bind() by pointing to a different host variable.
Definition: bcp.c:671
tds_submit_rollback
TDSRET tds_submit_rollback(TDSSOCKET *tds, int cont)
Send a rollback request.
Definition: query.c:3693
TDS_IS_MSSQL
#define TDS_IS_MSSQL(x)
Check if product is Microsft SQL Server.
Definition: tds.h:1726
TDS_PARSED_PARAM
Definition: odbc.h:532
tds_dstr_free
void tds_dstr_free(DSTR *s)
free string
Definition: tdsstring.c:62
tds_dstr_copy
DSTR * tds_dstr_copy(DSTR *s, const char *src)
copy a string from another
Definition: tdsstring.c:122
tds_quote_id
size_t tds_quote_id(TDSSOCKET *tds, char *buffer, const char *id, int idlen)
Quote an id.
Definition: query.c:2171
tds_column::column_scale
TDS_TINYINT column_scale
scale for decimal/numeric
Definition: tds.h:708
native_info
Definition: native.c:356
tds_login::user_name
DSTR user_name
account for login
Definition: tds.h:536
TDS_DEAD
@ TDS_DEAD
no connection
Definition: tds.h:799
tds_release_dynamic
void tds_release_dynamic(TDSDYNAMIC **pdyn)
Frees dynamic statement.
Definition: mem.c:253
_sql_errors
Definition: odbc.h:106
TDS_IDLE
@ TDS_IDLE
no data expected
Definition: tds.h:794
tds_headers
Definition: tds.h:576
bcp_sendrow
RETCODE bcp_sendrow(DBPROCESS *dbproc)
Write data in host variables to the table.
Definition: bcp.c:1381
TDS_FUNCS
Definition: odbc.h:441
tds_dstr_len
static size_t tds_dstr_len(const DSTR *s)
Returns the length of the string in bytes.
Definition: string.h:85
tds_socket
Information for a server connection.
Definition: tds.h:1167
DSTR_INITIALIZER
#define DSTR_INITIALIZER
Initializer, used to initialize string like in the following example.
Definition: string.h:49
tds_count_placeholders
int tds_count_placeholders(const char *query)
Count the number of placeholders ('?') in a query.
Definition: query.c:571
tds_submit_rpc
TDSRET tds_submit_rpc(TDSSOCKET *tds, const char *rpc_name, TDSPARAMINFO *params, TDSHEADERS *head)
Calls a RPC from server.
Definition: query.c:1929
TDS_DONE_ERROR
@ TDS_DONE_ERROR
error occurred
Definition: tds.h:253
tds_flush_packet
TDSRET tds_flush_packet(TDSSOCKET *tds)
Flush packet to server.
Definition: write.c:224
_hstmt::prev
struct _hstmt * prev
previous in list
Definition: odbc.h:394
tagSS_TIMESTAMPOFFSET_STRUCT
Definition: odbcss.h:139
tds_process_tokens
TDSRET tds_process_tokens(TDSSOCKET *tds, TDS_INT *result_type, int *done_flags, unsigned flag)
process all streams.
Definition: token.c:531
tds_submit_commit
TDSRET tds_submit_commit(TDSSOCKET *tds, int cont)
Send a commit request.
Definition: query.c:3724
bcp_batch
DBINT bcp_batch(DBPROCESS *dbproc)
Commit a set of rows to the table.
Definition: bcp.c:2010
_henv
Definition: odbc.h:237
TDS_PENDING
@ TDS_PENDING
cilent is waiting for data
Definition: tds.h:797
tds_column::column_type
TDS_SERVER_TYPE column_type
This type can be different from wire type because conversion (e.g.
Definition: tds.h:700
tds_write_dump
int tds_write_dump
Tell if TDS debug logging is turned on or off.
Definition: log.c:58
tds_context
Definition: tds.h:1033
_hstmt::tds
TDSSOCKET * tds
socket (only if active)
Definition: odbc.h:389
tds_deferred_unprepare
TDSRET tds_deferred_unprepare(TDSCONNECTION *conn, TDSDYNAMIC *dyn)
Unprepare dynamic on idle.
Definition: query.c:1774
tds_login
Definition: tds.h:519
tds_submit_prepare
TDSRET tds_submit_prepare(TDSSOCKET *tds, const char *query, const char *id, TDSDYNAMIC **dyn_out, TDSPARAMINFO *params)
Creates a temporary stored procedure in the server.
Definition: query.c:1124
tds_dstr_buf
static char * tds_dstr_buf(DSTR *s)
Returns a buffer to edit the string.
Definition: string.h:71
_hstmt::params
TDSPARAMINFO * params
parameters saved
Definition: odbc.h:409
tds_dstr_zero
void tds_dstr_zero(DSTR *s)
clear all string filling with zeroes (mainly for security reason)
Definition: tdsstring.c:55
tdsdump_log
void tdsdump_log(const char *file, unsigned int level_line, const char *fmt,...)
Write a message to the debug log.
Definition: log.c:396
odbc_set_concise_c_type
SQLRETURN odbc_set_concise_c_type(SQLSMALLINT concise_type, struct _drecord *drec, int check_only)
Set concise type and all cascading field.
Definition: odbc_util.c:1098