Re: SQL_ATTR_TRACE option doesn't work

"James K. Lowden" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
[email protected] wrote:
> 
> I'm calling this API:
> ::SQLSetConnectAttr(
>                                   hdbc,
>                                   SQL_ATTR_TRACE,
>                                   (SQLPOINTER)sitrace,
>                                   0 );
> 
> where sitrace is one of SQL_OPT_TRACE_ON or SQL_OPT_TRACE_OFF
> and get this error back:
> 
> HY092, Native error: 0, Msg: [FreeTDS][SQL Server]Invalid option;
> 
> I checked the source code in odbc.c and found that unless TDS_NO_DM is 
> defined the driver doesn't understand this option.

http://msdn.microsoft.com/en-us/library/ms713605(VS.85).aspx

It's normally a DM feature:

	"An SQLUINTEGER value telling the Driver Manager whether to perform
tracing:

SQL_OPT_TRACE_OFF = Tracing off (the default)
SQL_OPT_TRACE_ON = Tracing on

When tracing is on, the Driver Manager writes each ODBC function call to
the trace file."

It's not supported by the driver unless there's no DM present.  If you
removed the preprocessor guards, I would think you'd hit some kind of
conflict.  

HTH.  

--jkl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.