[freetds] RE: Bug in SQLNumResultCol function?

jun_chen at bankone.com jun_chen at bankone.com
Thu Jun 10 11:49:21 EDT 2004


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 
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 
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:



Date: Thu, 10 Jun 2004 08:45:34 +0200
From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio at vodafone.com>
Subject: RE: [freetds] Bug in SQLNumResultCol function
To: "FreeTDS Development Group" <freetds at lists.ibiblio.org>
 <F7F148C986A2A84F930FEB8C3B169EA025C617 at OPDMEXO01.omnitel.it>
Content-Type: text/plain;                charset="us-ascii"

> Hi,
> I am trying to use unixODBC and freetds for Oracle Generic 
> Connectivity so 
> that I
> can create database links to MS SQL Server in Oracle 10g database.
> I can run the unixodbc command isql -v <MS DB Name> <user 
> name> <password>
> to connect to the MS SQL Server and run the sql query 
> succssfully select * 
> from scProblem.
> But the same query select * from "scProblem"@msticket doesn't work by 
> using the database link msticket of the MS SQL server.
> Oracle support verified that the configuration of the db link 
> is fine. I 
> can run the following queries successfully:
> 1) select * from dual at msticket;
> 2) select * from all_catalog at msticket;
> Oracle support told me the reason that query select * from 
> "scProblem"@msticket doesn't work is  that known bugs in freetds.
> The bugs are:
> 1)  "describe table scProblem" doesn't work in freetd
> 2) In SQLNumResultCol function, freetds may return something 
> similar to: 
> [ODBC][22261][SQLNumResultCols.c][233]
> Count = ffbed858 -> 0
> instead of returning the real number of rows.
> when I run the query select * from "scProblem"@msticket.
> Could someone verify that? If so, are there any patches for them?
> Thank a lot in advanced.
> Jun

Hi Jun!

First you must use 0.63 version. We can't help with tests cause we don't
own Oracle + binder. Please enable unixODBC log and freetds log and post
them. If data contain sensitive data please send them privately to me
(or James).

I never see "describe table scProblem" syntax before... Perhaps it's an
Oracle syntax??


This transmission may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: freetds.log
Type: application/octet-stream
Size: 12204 bytes
Desc: not available
Url : http://lists.ibiblio.org/pipermail/freetds/attachments/20040610/fd0a8d18/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freetds.log
Type: application/octet-stream
Size: 14202 bytes
Desc: not available
Url : http://lists.ibiblio.org/pipermail/freetds/attachments/20040610/fd0a8d18/attachment-0001.obj 

More information about the FreeTDS mailing list