[freetds] RE: Bug in SQLNumResultCol function?

Frediano Ziglio freddyz77 at tin.it
Fri Jun 11 04:18:56 EDT 2004

Il gio, 2004-06-10 alle 17:49, jun_chen at bankone.com ha scritto:
> freddy77,
> Oracle support told me that Oracle informed freetds the issue and freetds 
> knew it. 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.
> 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 
> and added the following entries
> to odbc.ini:
> tracefile       = /admin/home/oracle/odbc.log
> trace           = on
> Then I run select * from "scProblem"@msticket from Oracle sqlplus and got 
> the following errors:
> select * from "scProblem"@msticket
>               *
> ERROR at line 1:
> ORA-00942: table or view does not exist
> [Generic Connectivity Using ODBC]DRV_DescribeTable: Record scProblem has 
> no
> fields. Loading failed
> ORA-02063: preceding 2 lines from MSTICKET
> But nothing showed up in freetds.log and odbc.log. How can I turn on the 
> trace in unixodbc and freetds? Did I do everything right?
> 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.
> Then I emptied the log file and run select count(ticket_nbr) from 
> scProblem, here is the log file:
> Thanks.
> Jun

Now I understand.
"describe table" it's an Oracle dialect, nor mssql nor ODBC. You must
use 0.63 (unstable), not 0.62. Support for Oracle connector was added
some months ago in CVS version. Technically you must be able to return
column informations after SQLPrepare. There is a test in our unittests
that test this behavior (and it works). We are not able to test so if
you encounter other problems with 0.63 please send freetds log (as you
did) and unixODBC one. For unixODBC log my /etc/odbcinst.ini contains
these lines:

Trace           = Yes
TraceFile               = /tmp/sql.log
ForceTrace              = Yes
Pooling         = No

More information about the FreeTDS mailing list