Skip to Content.
Sympa Menu

freetds - Re: [freetds] osql and isql -- how to test ODBC config?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Tony Esposito <Tony.Esposito AT region10.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>, "freetds-bounces AT lists.ibiblio.org" <freetds-bounces AT lists.ibiblio.org>, "James K. Lowden" <jklowden AT freetds.org>
  • Cc: Tony Esposito <Tony.Esposito AT region10.org>
  • Subject: Re: [freetds] osql and isql -- how to test ODBC config?
  • Date: Wed, 19 Sep 2012 20:46:29 +0000

James, Frediano,
Came across this during research. Tried it but no change. Thought
you might find it interesting.

"Some versions of hsODBC do not seem to recognise SQL_WCHAR,
SQL_WVARCHAR and SQL_WLONGVARCHAR columns. If a table contains these column
types, hsODBC will just error producing no rows. A workaround for this is to
add "DisguiseWide=1" to the DSN in your odbc.ini file."

-----Original Message-----
From: Tony Esposito
Sent: Wednesday, September 19, 2012 11:39 AM
To: FreeTDS Development Group; freetds-bounces AT lists.ibiblio.org; James K.
Lowden
Cc: Tony Esposito
Subject: RE: [freetds] osql and isql -- how to test ODBC config?

James, Frediano,
The ANSI standard error code 100 stands for 'no rows found', as
Frediano pointed out.
Question: Given that this may be an 'isql' error and that 'tsql'
works, would the ODBC layer actually be working and it is just that we need
another way to test it? (Maybe not since bsqlodbc does not work.)
I guess I need to know the next step, if there is any, to take.

James,
TDSDUMP file from an execution of bsqlodbc attached -- seems Frediano
has a point as the dunp file shows SQLExecute returning SQL_NO_DATA.

Just a reminder: I am attempting to access Sybase Anywhere 10. Could it be
that FreeTDS 0.91 was never fully tested against Sybase Anywhere 10 since
version 10 is so old?
Appreciate all the help, guys. You've been a pleasure to work with. And we
will get this figured out. :-)

Tony Esposito
ETL Developer
Information Services Programming
Region 10 Education Service Center
400 E Spring Valley Rd
Richardson, TX 75081
(Ph) 972-348-1284
(Fax) 972-348-1285
Reveal Data Analytics




-----Original Message-----
From:
freetds-bounces AT lists.ibiblio.org<mailto:freetds-bounces AT lists.ibiblio.org>
[mailto:freetds-bounces AT lists.ibiblio.org]<mailto:[mailto:freetds-bounces AT lists.ibiblio.org]>
On Behalf Of Frediano Ziglio
Sent: Wednesday, September 19, 2012 4:20 AM
To: FreeTDS Development Group
Subject: Re: [freetds] osql and isql -- how to test ODBC config?

2012/9/19 James K. Lowden <jklowden AT freetds.org<mailto:jklowden AT freetds.org>>:
> On Tue, 18 Sep 2012 19:56:14 +0000
> Tony Esposito
> <Tony.Esposito AT region10.org<mailto:Tony.Esposito AT region10.org>> wrote:
>
>> (1) Set my MANPATH so now I can find the man pages for bsqlodbc.
>
> Hurrah!
>
>> (2) Ran bsqlodbc and get the following:
>>
>> user #> bsqlodbc -U dba -P sql -S txeis -D DB246111 -i input.sql -o
>> output.sql -e error.sql
>>
>> Input file input.sql contents: select * from sr_stu_demo;
>> Output file output.sql contents: <empty>
>> Error file error.sql contents: bsqlodbc: error: 100 is an
>> unknown return code for SQLExecute
>
> As I suspected, a missing error message. But why?
>
> The number 100 has some significance but shouldn't show up in this
> context. The TDS library can return error 100 to indicate iconv is
> not supported for TDS protocol version 7.3, but you're using TDS 5.0
> and the error's being returned from SQLExecute, not SQLConnect.
>
> I'm afraid all I can suggest is to use TDSDUMP with the above command
> and, and lets have another look at the output. The log will show a
> lot of the call stack. It might yield a clue of where to look.
>
> You have found a bug, by definition. I think there's something funny
> in your configuration, something you'll easily be able to fix. The
> bug is that you shouldn't be able to get the system to produce that
> message, no matter what you do. So I am interested in how it
> happened.
>

No, 100 in ODBC is SQL_NO_DATA. From documentation SQLExecute/SQLExecDirect
should return SQL_NO_DATA if not data are returned. It seems that MS ODBC
never return this value. I think that I changed (not in 0.91!) our driver to
return SQL_NO_DATA according to MS ODBC. However it's a bug in isql in this
case.

Frediano
_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org<mailto:FreeTDS AT lists.ibiblio.org>
http://lists.ibiblio.org/mailman/listinfo/freetds


-----
No virus found in this message.
Checked by AVG - www.avg.com<http://www.avg.com>
Version: 2012.0.2221 / Virus Database: 2441/5277 - Release Date: 09/19/12

-----
No virus found in this message.
Checked by AVG - www.avg.com<http://www.avg.com>
Version: 2012.0.2221 / Virus Database: 2441/5277 - Release Date: 09/19/12





Archive powered by MHonArc 2.6.24.

Top of Page