Exemplo n.º 1
0
void
trace_SQLStatisticsW (int trace_leave, int retcode,
  SQLHSTMT		  hstmt,
  SQLWCHAR    		* szTableQualifier,
  SQLSMALLINT		  cbTableQualifier,
  SQLWCHAR    		* szTableOwner,
  SQLSMALLINT		  cbTableOwner,
  SQLWCHAR    		* szTableName,
  SQLSMALLINT		  cbTableName,
  SQLUSMALLINT		  fUnique,
  SQLUSMALLINT		  fAccuracy)
{
  /* Trace function */
  _trace_print_function (en_Statistics, trace_leave, retcode);

  /* Trace Arguments */
  _trace_handle (SQL_HANDLE_STMT, hstmt);
  _trace_string_w (szTableQualifier, cbTableQualifier, NULL, TRACE_INPUT);
  _trace_stringlen ("SQLSMALLINT", cbTableQualifier);
  _trace_string_w (szTableOwner, cbTableOwner, NULL, TRACE_INPUT);
  _trace_stringlen ("SQLSMALLINT", cbTableOwner);
  _trace_string_w (szTableName, cbTableName, NULL, TRACE_INPUT);
  _trace_stringlen ("SQLSMALLINT", cbTableName);
  _trace_stats_unique (fUnique);
  _trace_stats_accuracy (fAccuracy);
}
Exemplo n.º 2
0
void 
trace_SQLNativeSql (int trace_leave, int retcode,
  SQLHDBC		  hdbc,
  SQLCHAR		* InStatementText,
  SQLINTEGER		  TextLength1,
  SQLCHAR		* OutStatementText,
  SQLINTEGER		  BufferLength,
  SQLINTEGER		* TextLength2Ptr)
{
  SQLSMALLINT len = 0;

  if (TextLength2Ptr)
    len = *TextLength2Ptr;

  /* Trace function */
  _trace_print_function (en_NativeSql, trace_leave, retcode);

  /* Trace Arguments */
  _trace_handle (SQL_HANDLE_DBC, hdbc);
  _trace_string (InStatementText, TextLength1, NULL, TRACE_INPUT);
  _trace_stringlen ("SQLINTEGER", TextLength1);
  _trace_string (OutStatementText, BufferLength, &len, TRACE_OUTPUT_SUCCESS);
  _trace_stringlen ("SQLINTEGER", BufferLength);
  _trace_integer_p (TextLength2Ptr, TRACE_OUTPUT_SUCCESS);
}
Exemplo n.º 3
0
void
trace_SQLDrivers (int trace_leave, int retcode,
  SQLHENV		  EnvironmentHandle,
  SQLUSMALLINT		  Direction,
  SQLCHAR		* DriverDescription,
  SQLSMALLINT		  BufferLength1,
  SQLSMALLINT		* DescriptionLengthPtr,
  SQLCHAR		* DriverAttributes,
  SQLSMALLINT		  BufferLength2,
  SQLSMALLINT		* AttributesLengthPtr)
{
  /* Trace function */
  _trace_print_function (en_Drivers, trace_leave, retcode);

  /* Trace Arguments */
  _trace_handle (SQL_HANDLE_ENV, EnvironmentHandle);
  _trace_direction (Direction);
  _trace_string (DriverDescription, BufferLength1, DescriptionLengthPtr,
      TRACE_OUTPUT_SUCCESS);
  _trace_stringlen ("SQLSMALLINT", BufferLength1);
  _trace_smallint_p (DescriptionLengthPtr, TRACE_OUTPUT_SUCCESS);
  _trace_string (DriverAttributes, BufferLength2, AttributesLengthPtr,
      TRACE_OUTPUT_SUCCESS);
  _trace_stringlen ("SQLSMALLINT", BufferLength2);
  _trace_smallint_p (AttributesLengthPtr, TRACE_OUTPUT_SUCCESS);
}
Exemplo n.º 4
0
void
trace_SQLGetDiagRec (int trace_leave, int retcode,
  SQLSMALLINT		  HandleType,
  SQLHANDLE		  Handle,
  SQLSMALLINT		  RecNumber,
  SQLCHAR		* SqlState,
  SQLINTEGER		* NativeErrorPtr,
  SQLCHAR		* MessageText,
  SQLSMALLINT		  BufferLength,
  SQLSMALLINT		* TextLengthPtr)
{
  /* Trace function */
  _trace_print_function (en_GetDiagRec, trace_leave, retcode);

  /* Trace Arguments */
  _trace_handletype (HandleType);
  _trace_handle (HandleType, Handle);
  _trace_smallint (RecNumber);
  _trace_string (SqlState, SQL_NTS, NULL, TRACE_OUTPUT_SUCCESS);
  _trace_integer_p (NativeErrorPtr, TRACE_OUTPUT_SUCCESS);
  _trace_string (MessageText, BufferLength, TextLengthPtr,
      TRACE_OUTPUT_SUCCESS);
  _trace_stringlen ("SQLSMALLINT", BufferLength);
  _trace_smallint_p (TextLengthPtr, trace_leave);
}
Exemplo n.º 5
0
void
trace_SQLDataSources (int trace_leave, int retcode,
  SQLHENV		  EnvironmentHandle,
  SQLUSMALLINT		  Direction,
  SQLCHAR		* ServerName,
  SQLSMALLINT		  BufferLength1,
  SQLSMALLINT		* NameLength1Ptr,
  SQLCHAR		* Description,
  SQLSMALLINT		  BufferLength2,
  SQLSMALLINT		* NameLength2Ptr)
{
  /* Trace function */
  _trace_print_function (en_DataSources, trace_leave, retcode);

  /* Trace Arguments */
  _trace_handle (SQL_HANDLE_ENV, EnvironmentHandle);
  _trace_direction (Direction);
  _trace_string (ServerName, BufferLength1, NameLength1Ptr,
      TRACE_OUTPUT_SUCCESS);
  _trace_stringlen ("SQLSMALLINT", BufferLength1);
  _trace_smallint_p (NameLength1Ptr, TRACE_OUTPUT_SUCCESS);
  _trace_string (Description, BufferLength2, NameLength2Ptr,
      TRACE_OUTPUT_SUCCESS);
  _trace_stringlen ("SQLSMALLINT", BufferLength2);
  _trace_smallint_p (NameLength2Ptr, TRACE_OUTPUT_SUCCESS);
}
Exemplo n.º 6
0
void 
trace_SQLBindParameter (int trace_leave, int retcode,
  SQLHSTMT		  StatementHandle,
  SQLUSMALLINT		  ParameterNumber,
  SQLSMALLINT		  InputOutputType,
  SQLSMALLINT		  ValueType,
  SQLSMALLINT		  ParameterType,
  SQLUINTEGER		  ColumnSize,
  SQLSMALLINT		  DecimalDigits,
  SQLPOINTER		  ParameterValuePtr,
  SQLLEN		  BufferLength,
  SQLLEN		* Strlen_or_IndPtr)
{
  /* Trace function */
  _trace_print_function (en_BindParameter, trace_leave, retcode);

  /* Trace Arguments */
  _trace_handle (SQL_HANDLE_STMT, StatementHandle);
  _trace_smallint (ParameterNumber);
  _trace_inouttype (InputOutputType);
  _trace_c_type (ValueType);
  _trace_sql_type (ParameterType);
  _trace_uinteger (ColumnSize);
  _trace_smallint (DecimalDigits);
  _trace_pointer (ParameterValuePtr);
  _trace_len (BufferLength);
  _trace_len_p (Strlen_or_IndPtr, TRACE_OUTPUT_SUCCESS);
}
void
trace_SQLSpecialColumnsW (int trace_leave, int retcode,
  SQLHSTMT		  hstmt,
  SQLUSMALLINT		  fColType,
  SQLWCHAR    		* szTableQualifier,
  SQLSMALLINT		  cbTableQualifier,
  SQLWCHAR    		* szTableOwner,
  SQLSMALLINT		  cbTableOwner,
  SQLWCHAR    		* szTableName,
  SQLSMALLINT		  cbTableName,
  SQLUSMALLINT		  fScope,
  SQLUSMALLINT		  fNullable)
{
  /* Trace function */
  _trace_print_function (en_SpecialColumnsW, trace_leave, retcode);

  /* Trace Arguments */
  _trace_handle (SQL_HANDLE_STMT, hstmt);
  _trace_spcols_type (fColType);
  _trace_string_w (szTableQualifier, cbTableQualifier, NULL, TRACE_INPUT);
  _trace_stringlen ("SQLSMALLINT", cbTableQualifier);
  _trace_string_w (szTableOwner, cbTableOwner, NULL, TRACE_INPUT);
  _trace_stringlen ("SQLSMALLINT", cbTableOwner);
  _trace_string_w (szTableName, cbTableName, NULL, TRACE_INPUT);
  _trace_stringlen ("SQLSMALLINT", cbTableName);
  _trace_spcols_scope (fScope);
  _trace_spcols_null (fNullable);
}
void
trace_SQLColumnPrivilegesW (int trace_leave, int retcode,
  SQLHSTMT		  hstmt,
  SQLWCHAR  		* szTableQualifier,
  SQLSMALLINT		  cbTableQualifier,
  SQLWCHAR  		* szTableOwner,
  SQLSMALLINT		  cbTableOwner,
  SQLWCHAR  		* szTableName,
  SQLSMALLINT		  cbTableName,
  SQLWCHAR  		* szColumnName,
  SQLSMALLINT		  cbColumnName)
{
  /* Trace function */
  _trace_print_function (en_ColumnPrivilegesW, trace_leave, retcode);

  /* Trace Arguments */
  _trace_handle (SQL_HANDLE_STMT, hstmt);
  _trace_string_w (szTableQualifier, cbTableQualifier, NULL, TRACE_INPUT);
  _trace_stringlen ("SQLSMALLINT", cbTableQualifier);
  _trace_string_w (szTableOwner, cbTableOwner, NULL, TRACE_INPUT);
  _trace_stringlen ("SQLSMALLINT", cbTableOwner);
  _trace_string_w (szTableName, cbTableName, NULL, TRACE_INPUT);
  _trace_stringlen ("SQLSMALLINT", cbTableName);
  _trace_string_w (szColumnName, cbColumnName, NULL, TRACE_INPUT);
  _trace_stringlen ("SQLSMALLINT", cbColumnName);
}
Exemplo n.º 9
0
void
trace_SQLGetDescRec (int trace_leave, int retcode,
  SQLHDESC		  DescriptorHandle,
  SQLSMALLINT		  RecNumber,
  SQLCHAR		* Name,
  SQLSMALLINT		  BufferLength,
  SQLSMALLINT		* StringLengthPtr,
  SQLSMALLINT		* TypePtr,
  SQLSMALLINT		* SubTypePtr,
  SQLLEN		* LengthPtr,
  SQLSMALLINT		* PrecisionPtr,
  SQLSMALLINT		* ScalePtr,
  SQLSMALLINT		* NullablePtr)
{
  /* Trace function */
  _trace_print_function (en_GetDescRec, trace_leave, retcode);

  /* Trace Arguments */
  _trace_handle (SQL_HANDLE_DESC, DescriptorHandle);
  _trace_smallint (RecNumber);
  _trace_string (Name, BufferLength, StringLengthPtr, TRACE_OUTPUT_SUCCESS);
  _trace_stringlen ("SQLSMALLINT", BufferLength);
  _trace_smallint_p (StringLengthPtr, TRACE_OUTPUT_SUCCESS);
  _trace_sql_type_p (TypePtr, TRACE_OUTPUT_SUCCESS);
  _trace_sql_subtype (TypePtr, SubTypePtr, TRACE_OUTPUT_SUCCESS);
  _trace_len_p (LengthPtr, TRACE_OUTPUT_SUCCESS);
  _trace_smallint_p (PrecisionPtr, TRACE_OUTPUT_SUCCESS);
  _trace_smallint_p (ScalePtr, TRACE_OUTPUT_SUCCESS);
  _trace_desc_null (NullablePtr, TRACE_OUTPUT_SUCCESS);
}
Exemplo n.º 10
0
void
trace_SQLSetDescRec (int trace_leave, int retcode,
  SQLHDESC		  DescriptorHandle,
  SQLSMALLINT		  RecNumber,
  SQLSMALLINT		  Type,
  SQLSMALLINT		  SubType,
  SQLLEN		  Length,
  SQLSMALLINT		  Precision,
  SQLSMALLINT		  Scale,
  SQLPOINTER		  Data,
  SQLLEN		* StringLength,
  SQLLEN		* Indicator)
{
  /* Trace function */
  _trace_print_function (en_SetDescRec, trace_leave, retcode);

  /* Trace Arguments */
  _trace_handle (SQL_HANDLE_DESC, DescriptorHandle);
  _trace_smallint (RecNumber);
  _trace_smallint (Type);
  _trace_smallint (SubType);
  _trace_len (Length);
  _trace_smallint (Precision);
  _trace_smallint (Scale);
  _trace_pointer (Data);
  _trace_len_p (StringLength, TRACE_OUTPUT_SUCCESS);
  _trace_len_p (Indicator, TRACE_OUTPUT_SUCCESS);
}
Exemplo n.º 11
0
void
trace_SQLDescribeColW (int trace_leave, int retcode,
  SQLHSTMT		  StatementHandle,
  SQLSMALLINT		  ColumnNumber,
  SQLWCHAR		* ColumnName,
  SQLSMALLINT		  BufferLength,
  SQLSMALLINT		* NameLengthPtr,
  SQLSMALLINT		* DataTypePtr,
  SQLULEN		* ColumnSizePtr,
  SQLSMALLINT		* DecimalDigitsPtr,
  SQLSMALLINT		* NullablePtr)
{
  /* Trace function */
  _trace_print_function (en_DescribeColW, trace_leave, retcode);
  
  /* Trace Arguments */
  _trace_handle (SQL_HANDLE_STMT, StatementHandle);
  _trace_usmallint (ColumnNumber);
  _trace_string_w (ColumnName, BufferLength, NameLengthPtr, TRACE_OUTPUT_SUCCESS);
  _trace_stringlen ("SQLSMALLINT", BufferLength);
  _trace_smallint_p (NameLengthPtr, TRACE_OUTPUT_SUCCESS);
  _trace_sql_type_p (DataTypePtr, TRACE_OUTPUT_SUCCESS);
  _trace_ulen_p (ColumnSizePtr, TRACE_OUTPUT_SUCCESS);
  _trace_smallint_p (DecimalDigitsPtr, TRACE_OUTPUT_SUCCESS);
  _trace_desc_null (NullablePtr, TRACE_OUTPUT_SUCCESS);
}
Exemplo n.º 12
0
void
trace_SQLConnect (int trace_leave, int retcode,
  SQLHDBC		  hdbc,
  SQLCHAR  		* szDSN,
  SQLSMALLINT		  cbDSN,
  SQLCHAR   		* szUID,
  SQLSMALLINT		  cbUID,
  SQLCHAR   		* szAuthStr,
  SQLSMALLINT		  cbAuthStr)
{
  /* Trace function */
  _trace_print_function (en_Connect, trace_leave, retcode);

  /* Hide plaintext passwords */
  szAuthStr = (SQLCHAR *) "****";

  /* Trace Arguments */
  _trace_handle (SQL_HANDLE_DBC, hdbc);
  _trace_string (szDSN, cbDSN, NULL, TRACE_INPUT);
  _trace_stringlen ("SQLSMALLINT", cbDSN);
  _trace_string (szUID, cbUID, NULL, TRACE_INPUT);
  _trace_stringlen ("SQLSMALLINT", cbDSN);
  _trace_string (szAuthStr, SQL_NTS, NULL, TRACE_INPUT);
  _trace_stringlen ("SQLSMALLINT", cbAuthStr);
}
Exemplo n.º 13
0
void 
trace_SQLTables (int trace_leave, int retcode,
  SQLHSTMT		  hstmt,
  SQLCHAR    		* szTableQualifier,
  SQLSMALLINT		  cbTableQualifier,
  SQLCHAR    		* szTableOwner,
  SQLSMALLINT		  cbTableOwner,
  SQLCHAR    		* szTableName,
  SQLSMALLINT		  cbTableName,
  SQLCHAR    		* szTableType,
  SQLSMALLINT		  cbTableType)
{
  /* Trace function */
  _trace_print_function (en_Tables, trace_leave, retcode);

  /* Trace Arguments */
  _trace_handle (SQL_HANDLE_STMT, hstmt);
  _trace_string (szTableQualifier, cbTableQualifier, NULL, TRACE_INPUT);
  _trace_stringlen ("SQLSMALLINT", cbTableQualifier);
  _trace_string (szTableOwner, cbTableOwner, NULL, TRACE_INPUT);
  _trace_stringlen ("SQLSMALLINT", cbTableOwner);
  _trace_string (szTableName, cbTableName, NULL, TRACE_INPUT);
  _trace_stringlen ("SQLSMALLINT", cbTableName);
  _trace_string (szTableType, cbTableType, NULL, TRACE_INPUT);
  _trace_stringlen ("SQLSMALLINT", cbTableType);
}
Exemplo n.º 14
0
void
trace_SQLFreeConnect (int trace_leave, int retcode, SQLHDBC hdbc)
{
  /* Trace function */
  _trace_print_function (en_FreeConnect, trace_leave, retcode);

  /* Trace Arguments */
  _trace_handle (SQL_HANDLE_DBC, hdbc);
}
Exemplo n.º 15
0
void
trace_SQLFetch (int trace_leave, int retcode, 
  SQLHSTMT		   hstmt)
{
  /* Trace function */
  _trace_print_function (en_Fetch, trace_leave, retcode);

  /* Trace Arguments */
  _trace_handle (SQL_HANDLE_STMT, hstmt);
}
Exemplo n.º 16
0
void
trace_SQLAllocStmt(int trace_leave, int retcode, SQLHDBC hdbc, SQLHSTMT *phstmt)
{
  /* Trace function */
  _trace_print_function (en_AllocStmt, trace_leave, retcode);

  /* Trace Arguments */
  _trace_handle (SQL_HANDLE_DBC, hdbc);
  _trace_handle_p (SQL_HANDLE_STMT, phstmt, TRACE_OUTPUT_SUCCESS);
}
Exemplo n.º 17
0
void
trace_SQLCloseCursor (int trace_leave, int retcode,
  SQLHSTMT		  StatementHandle)
{
  /* Trace function */
  _trace_print_function (en_CloseCursor, trace_leave, retcode);

  /* Trace Arguments */
  _trace_handle (SQL_HANDLE_STMT, StatementHandle);
}
Exemplo n.º 18
0
void
trace_SQLAllocEnv(int trace_leave, int retcode, 
    SQLHENV	* phenv)
{
  /* Trace function */
  _trace_print_function (en_AllocEnv, trace_leave, retcode);

  /* Trace Arguments */
  _trace_handle_p (SQL_HANDLE_ENV, phenv, TRACE_OUTPUT_SUCCESS);
}
Exemplo n.º 19
0
void
trace_SQLDisconnect (int trace_leave, int retcode,
  SQLHDBC		  ConnectionHandle)
{
  /* Trace function */
  _trace_print_function (en_Disconnect, trace_leave, retcode);

  /* Trace Arguments */
  _trace_handle (SQL_HANDLE_DBC, ConnectionHandle);
}
Exemplo n.º 20
0
void 
trace_SQLFreeHandle (int trace_leave, int retcode,
  SQLSMALLINT		  HandleType,
  SQLHANDLE		  Handle)
{
  /* Trace function */
  _trace_print_function (en_FreeHandle, trace_leave, retcode);

  /* Trace Arguments */
  _trace_handletype (HandleType);
  _trace_handle (HandleType, Handle);
}
Exemplo n.º 21
0
void 
trace_SQLGetTypeInfoW (int trace_leave, int retcode,
  SQLHSTMT		  hstmt,
  SQLSMALLINT		  fSqlType)
{
  /* Trace function */
  _trace_print_function (en_GetTypeInfoW, trace_leave, retcode);

  /* Trace Arguments */
  _trace_handle (SQL_HANDLE_STMT, hstmt);
  _trace_typeinfo (fSqlType);
}
Exemplo n.º 22
0
void 
trace_SQLRowCount (int trace_leave, int retcode,
  SQLHSTMT		  hstmt,
  SQLLEN	     	* pcrow)
{
  /* Trace function */
  _trace_print_function (en_RowCount, trace_leave, retcode);

  /* Trace Arguments */
  _trace_handle (SQL_HANDLE_STMT, hstmt);
  _trace_len_p (pcrow, TRACE_OUTPUT_SUCCESS);
}
Exemplo n.º 23
0
void 
trace_SQLNumParams (int trace_leave, int retcode,
  SQLHSTMT		  hstmt,
  SQLSMALLINT    	* pcpar)
{
  /* Trace function */
  _trace_print_function (en_NumParams, trace_leave, retcode);

  /* Trace Arguments */
  _trace_handle (SQL_HANDLE_STMT, hstmt);
  _trace_smallint_p (pcpar, TRACE_OUTPUT_SUCCESS);
}
Exemplo n.º 24
0
void trace_SQLEndTran (int trace_leave, int retcode,
  SQLSMALLINT		  HandleType,
  SQLHANDLE		  Handle,
  SQLSMALLINT		  CompletionType)
{
  /* Trace function */
  _trace_print_function (en_EndTran, trace_leave, retcode);

  /* Trace Arguments */
  _trace_handletype (HandleType);
  _trace_handle (HandleType, Handle);
  _trace_tran_completion (CompletionType);
}
Exemplo n.º 25
0
void
trace_SQLGetFunctions (int trace_leave, int retcode,
  SQLHDBC		  hdbc,
  SQLUSMALLINT		  fFunc,
  SQLUSMALLINT     	* pfExists)
{
  /* Trace function */
  _trace_print_function (en_GetFunctions, trace_leave, retcode);

  /* Trace Arguments */
  _trace_handle (SQL_HANDLE_DBC, hdbc);
  _trace_func_name (fFunc, 1);
  _trace_func_result (fFunc, pfExists, trace_leave);
}
Exemplo n.º 26
0
void
trace_SQLExecDirectW (int trace_leave, int retcode, 
  SQLHSTMT 		  hstmt,
  SQLWCHAR 		* szSqlStr,
  SQLINTEGER		  cbSqlStr)
{
  /* Trace function */
  _trace_print_function (en_ExecDirectW, trace_leave, retcode);

  /* Trace Arguments */
  _trace_handle (SQL_HANDLE_STMT, hstmt);
  _trace_string_w (szSqlStr, cbSqlStr, NULL, TRACE_INPUT);
  _trace_stringlen ("SQLINTEGER", cbSqlStr);
}
Exemplo n.º 27
0
void
trace_SQLPrepareW (int trace_leave, int retcode,
  SQLHSTMT		  StatementHandle,
  SQLWCHAR 		* StatementText,
  SQLINTEGER		  TextLength)
{
  /* Trace function */
  _trace_print_function (en_PrepareW, trace_leave, retcode);

  /* Trace Arguments */
  _trace_handle (SQL_HANDLE_STMT, StatementHandle);
  _trace_string_w (StatementText, TextLength, NULL, TRACE_INPUT);
  _trace_stringlen ("SQLINTEGER", TextLength);
}
Exemplo n.º 28
0
void 
trace_SQLFetchScroll (int trace_leave, int retcode,
  SQLHSTMT		  StatementHandle,
  SQLSMALLINT		  FetchOrientation,
  SQLLEN		  FetchOffset)
{
  /* Trace function */
  _trace_print_function (en_FetchScroll, trace_leave, retcode);

  /* Trace Arguments */
  _trace_handle (SQL_HANDLE_STMT, StatementHandle);
  _trace_fetchtype (FetchOrientation);
  _trace_len (FetchOffset);
}
Exemplo n.º 29
0
void
trace_SQLSetStmtOption (int trace_leave, int retcode,
  SQLHSTMT		  hstmt,
  SQLUSMALLINT		  fOption,
  SQLUINTEGER		  vParam)
{
  /* Trace function */
  _trace_print_function (en_SetStmtOption, trace_leave, retcode);

  /* Trace Arguments */
  _trace_handle (SQL_HANDLE_STMT, hstmt);
  _trace_stmtopt_type (fOption);
  _trace_uinteger (vParam);
}
Exemplo n.º 30
0
void
trace_SQLPutData (int trace_leave, int retcode,
                  SQLHSTMT		  hstmt,
                  SQLPOINTER		  rgbValue,
                  SQLLEN		  cbValue)
{
    /* Trace function */
    _trace_print_function (en_PutData, trace_leave, retcode);

    /* Trace Arguments */
    _trace_handle (SQL_HANDLE_STMT, hstmt);
    _trace_pointer (rgbValue);
    _trace_len (cbValue);
}