ACC: TraceSQLMode Setting Helps Debug SQL Queries to ODBCID: Q113918
|
Advanced: Requires expert coding, interoperability, and multiuser skills.
Microsoft Access can record all SQL statements sent to an ODBC data
source in a file called Sqlout.txt. You can create this log file by
setting the TraceSQLMode setting to 1.
To create a log file of all the SQL queries sent to ODBC for processing, do the following.
\HKEY_LOCAL_MACHINE\Software\Microsoft\Office\8.0\Access\Jet\3.5
\Engines\ODBC
\HKEY_LOCAL_MACHINE\Software\Microsoft\Access\7.0\Jet\3.0
\Engines\ODBC
[ODBC]
TraceSQLMode=1
SELECT DISTINCTROW dbo_authors.au_id, dbo_authors.au_lname,
dbo_authors.au_fname, dbo_authors.phone, dbo_authors.address,
dbo_authors.city, dbo_authors.state, dbo_authors.zip,
dbo_authors.contract FROM dbo_authors;
================= Open the attached dbo.authors ==================
SQLExecDirect: SELECT dbo.authors.au_id FROM dbo.authors
SQLExecDirect: SELECT au_id,au_lname,au_fname,phone,
address,city,state,zip,contract FROM dbo.authors
SQLPrepare: SELECT au_id,au_lname,au_fname,phone,address,city,
state,zip,contract FROM dbo.authors WHERE au_id = ? OR
au_id = ? OR au_id = ? OR au_id = ? OR au_id = ? OR
au_id = ? OR au_id = ? OR au_id = ? OR au_id = ? OR au_id = ?
SQLExecute: (MULTI-ROW FETCH)
===================================================================
For more information about setting options for ODBC, search the Help
Index for "registry," or ask the Microsoft Access 97 Office Assistant.
For more information about setting options for ODBC, search for "ODBC
Settings" then "Customizing MSACC20.INI Settings" using the Microsoft
Access version 2.0 Help menu.
Additional query words: queries tracing sqltrace
Keywords : kbusage OdbcOthr
Version : 1.10 2.0 7.0 97
Platform : WINDOWS
Issue type : kbinfo
Last Reviewed: April 3, 1999