File: README.debug

package info (click to toggle)
myodbc 5.1.10-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, sid
  • size: 2,984 kB
  • ctags: 2,099
  • sloc: ansic: 33,649; cpp: 1,360; xml: 1,261; sh: 353; makefile: 264; perl: 43
file content (98 lines) | stat: -rw-r--r-- 2,996 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
+-------------------------------------------------------------+
| Connector/ODBC                                              |
| Debug                                                       |
+-------------------------------------------------------------+


INTRODUCTION
---------------------------------------------------------------

This brief document describes some methods to debug a problem
in the driver - it is hoped to be useful to experienced 
programmers - particularly driver developers. 

Debugging the driver can be done in a number of ways but is
not usually done by stepping through the source code in debug
mode of gdb or an IDE for example. The most common method is to
get the driver manager to produce trace information showing the
calls being made, the return codes and other useful information.


COMPILER DEBUG INFORMATION
---------------------------------------------------------------

As usual; the driver can be built with or without compiler 
generated debugging information. In practice; this is not the 
most common method to debug problems with the driver. 

This is independent of any of the trace options listed here.


ODBC TRACE
---------------------------------------------------------------

If you are using a Driver Manager (DM) - and most people do - 
then you can turn on ODBC Trace. An ODBC Trace will produce a 
file which shows all of the ODBC calls being made and some very
useful details.

ODBC Trace is particularly useful to see the interaction between
the application and the DM. In some cases an application may be
using software layered on top of ODBC (ADO for example) and in 
this case ODBC Trace is the best way to see how that intermediate 
layer is interacting with ODBC.

ODBC Trace can be turned on/off using the ODBC Administrator.

MS Windows
----------

Invoke the ODBC Administrator from the Start menu;

Start -> Control Panel -> Administrative Tools -> ODBC Administrator

Use the options on the Trace tab to turn tracing on/off. 

NOTE: You should close the ODBC Administrator program to ensure 
      that the changes have taken affect - Apply/Ok is not always 
      enough.

unixODBC
--------

Invoke the ODBCConfig GUI. This can be done from the command-line
in a shell. Turn ODBC Trace on/off and close the application.


FLAG_LOG_QUERY
--------------

This is a DSN config option which can be set to turn on feature
to log queries to a file.

The location of the trace output is dependent upon the
DRIVER_QUERY_LOGFILE const.

This option may be presented as "Save Queries to" in the
DSN edit.

This is meaningless if DBUG_OFF has been set at build-time.

DRIVER_QUERY_LOGFILE
--------------------

This is a hardcoded file location/name for the query log.

           WIN : "c:\\myodbc.sql"
           UNIX: "/tmp/myodbc.sql"


SQL_OPT_TRACE
-------------

This connection attribute is implemented in the Driver Manager.

SQL_OPT_TRACEFILE
-----------------

This connection attribute is implemented in the Driver Manager.