ODBCLink/SE Reference Manual

Troubleshooting

Tools on the Client PC

The preferred method to trace ODBC calls on the client is by setting the “Trace ODBC Calls” check box in ODBC setup. However, Syware’s Dr. DeeBee Spy is installed with ODBCLink/SE (in the Windows directory). It can be used to trace calls to any ODBC driver.

ODBC Call Tracing using ODBCLink.LOG

To log all the ODBC calls made by the client, check the box “Trace ODBC calls on the client” on the data-source setup screen. This will create a file, called ODBCLINK.LOG, of all the ODBC calls made by the client. This file normally resides in the directory where the ODBC application was started from. Some applications however change their working directory, for MS-Access for instance look for the log file in “My Documents” directory.

Here is the format of the ODBCLINK.LOG file:

SQLDriverConnect(0) hstmt=0 Ver= 5.52.0000 szConnStrIn=<DSN=DBA MEMBER; UID=Admin; PWD=>,Completed_string=<DSN=DBA MEMBER; UID=#mpeix/192.9.3.10:MembrDBE.SQL.mbftest,,an# DBA,dba/.MBFTEST/ password,work/> Login=<>

SQLError(100) hstmt=0 pfNativeError=0,szErrorMsg= SQLGetInfo(0) hstmt=0 fInfoType=23, rgbInfoValue= [1,0,0,0] SQLSetConnectOption(0) hstmt=0 fOption=101 vParam=1 SQLAllocStmt(0) hstmt=0

SQLGetStmtOption(0) hstmt=0 fOption=0 vParam=0 SQLSetStmtOption(-1) hstmt=0 fOption=0 vParam=60

SQLError(0) hstmt=0 pfNativeError=-57,szErrorMsg=[ODBCLN32.DLL] Driver not capable

SQLError(100) hstmt=0 pfNativeError=0,szErrorMsg=

SQLExecDirect(0) hstmt=0 SELECT MEMBERDB.ACCTHIST.NUMBER,MEMBERDB.ACCTHIST.TRANTYPE,MEMB ERDB.ACCTHIST.

TRANDATE FROM MEMBERDB.ACCTHIST

SQLFetch(0) hstmt=0

SQLGetData(0) hstmt=0 icol=1 fCType=99 pcbValue=4 data= '[25,39,0,0]

SQLGetData(0) hstmt=0 icol=2 fCType=99 pcbValue=3 data=INV[73,78,86,0]

SQLGetData(0) hstmt=0 icol=3 fCType=99 pcbValue=6 data=È [-56,7,1,0]

Each line starts with the name of the function being called, with the return code in brackets, followed by the different parameters of the call. Refer to the ODBC SDK manual for a description of the parameters of the call.

ODBC Call Tracing using Dr. DeeBee Spy

Dr. DeeBee Spy traces calls to the ODBC driver. Dr. DeeBee Spy logs each function call along with the input and output values. To turn on logging, do the following:

From the Program Manager Menu in Windows, click on RUN.

Type DRDBSP.

Choose OK.

Select the Data Source Name to be traced.

Choose OK.

ODBCLink/SE

 

©M.B. Foster Associates Limited 1995-2000

63

Page 73
Image 73
HP MPE/iX 6.x Operating System manual Tools on the Client PC, Odbc Call Tracing using ODBCLink.LOG