[freetds] RE: Bug in SQLNumResultCol function?

Lowden, James K LowdenJK at bernstein.com
Thu Jun 10 12:38:16 EDT 2004


> [mailto:freetds-bounces at lists.ibiblio.org]On Behalf Of
> jun_chen at bankone.com
> Sent: June 10, 2004 11:49 AM
> 
> Oracle support told me that Oracle informed freetds the issue 
> and freetds knew it. 

Did they now?  This is a free software project, and we wear our warts on our sleeve.  If you find anything in the mailing list archives from Oracle on this topic, then you'll know what you were told was true.  

> describe table <table name> is also a command in IBM DB2.
> In Oracle 9i and up, the command is describe <table name>. 
> Oracle support 
> said the command describe has to work in order for oracle to 
> use the odbc driver.

Google says:
	
	Your search - "describe table" odbc site:microsoft.com - did not match any documents.

Can you find it in the ODBC specification?  

I know this: "describe table" is not something any Sybase or Microsoft server understands.  Any driver that supported it would have to convert it.  FreeTDS does not attempt to interpret any SQL; it merely passes it to the server.  

ODBC defines functions that return table metadata.  

> The version of freetds I'm using is 0.62.3  which I 
> downloaded about one 
> month ago (the stable version).
> I turned on the logging by export 
> TDSDUMP=/admin/home/oracle/freetds.log 
...
> But nothing showed up in freetds.log and odbc.log. How can I 
> turn on the trace in unixodbc and freetds? 

You might try using the "dump file" entry in freetds.conf, unless you're very sure that the exported TDSDUMP variable is seen by the process invoking FreeTDS.  

> If I run the unixodbc command isql -v peregrine <user name> 
> <password> and 
> then the following command describe table scProblem,
> here is the log freetds.log.

And it shows exactly what we'd expect: an Incorrect Syntax error returned from the server, because "describe" is not a T-SQL keyword.  

In sum, Jun, this is how I see it:

1.  The next time someone at Oracle claims to have "told FreeTDS" anything, see if you can get, oh, a date or a name.  I'd remember any engagement on this list from anyone at Oracle, and I think you were buffaloed.  

2.  "Describe table" won't work, no way, no how, with FreeTDS.  It's not in the ODBC specification, and I doubt any ODBC driver for any TDS database supports it.  

3.  FreeTDS has been used successfully between Oracle and Microsoft/Sybase servers.  I don't know the details, but it was discussed this year on this list.  

4.  When you're connected to Oracle and issue a "describe table" command targetting a table on an ODBC-linked server, Oracle has to do some mediation (if it's going to support that).  Oracle will interpret the SQL, and use standard ODBC functions to extract the metadata from the driver.  In no event will it simply fob off the SQL to the downstream server.  

I hope that clears things up somewhat.  

--jkl

-----------------------------------------
The information contained in this transmission may contain privileged and confidential information and is intended only for the use of the person(s) named above. If you are not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, any review, dissemination, distribution or duplication of this communication is strictly prohibited. If you are not the intended recipient, please contact the sender immediately by reply e-mail and destroy all copies of the original message. Please note that we do not accept account orders and/or instructions by e-mail, and therefore will not be responsible for carrying out such orders and/or instructions.
If you, as the intended recipient of this message, the purpose of which is to inform and update our clients, prospects and consultants of developments relating to our services and products, would not like to receive further e-mail correspondence from the sender, please "reply" to the sender indicating your wishes.  In the U.S.: 1345 Avenue of the Americas, New York, NY 10105.





More information about the FreeTDS mailing list