sqlpostgresqlodbcpsqlodbc

HSTMT, UCHAR, SDWORD meaning in ODBC Log


I have the following lines in my ODBC Log :

(Scenario: pgAdmin4, using PostgreSQL server through ODBC32 in another application named System Administration)

System Admi 6a0-6f8 ENTER SQLExecDirect 
        HSTMT               0x00630718
        UCHAR *             0x036B29C0 [      63] "create table new (npages integer, ifnds integer, ifnid integer)"
        SDWORD                    63

I need to know the meaning of HSTMT, UCHAR* and SDWORD. What do those numbers next to them mean ?


Solution

  • From the article Everything You Want To Know About ODBC Tracing

    In the trace log, you’ll see the data type of the handle being SQLHANDLE, HENV / SQLHENV, HDBC / SQLHDBC, HSTMT / SQLHSTMT. This value is unique to the particular series of items being called. You can search in the trace log for this handle number and each call made on the handle will be shown. This allows you to pick out only the calls in the trace log that are relevant to your error message. Keep in mind, some applications may create multiple handles. For example, your application may execute three statements consecutively with each residing on a different statement handle.

    For examples and more details follow the next nice document:-

    How to read an ODBC trace file.rtf