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: "James K. Lowden" <jklowden AT freetds.org>
  • To: freetds AT lists.ibiblio.org
  • Subject: Re: [freetds] osql and isql -- how to test ODBC config?
  • Date: Sat, 15 Sep 2012 11:23:25 -0400

On Thu, 13 Sep 2012 14:35:03 +0000
Tony Esposito <Tony.Esposito AT region10.org> wrote:

> (1) tsql connects and returns data fine.
> (2) fisql connects and returns data fine.
>
> So it appears the FreeTDS client is setup correctly but...

One cannot generalize from tsql to odbc because ODBC requires
additional setup. "tsql servername" and "isql servername" may use
different servers and even different copies of FreeTDS.

> isql connects yet returns no data when doing a SELECT (see error
> below):
>
> isql -v txeis dba sql
> +---------------------------------------+
> | Connected! |
> | |
> | sql-statement |
> | help [tablename] |
> | quit |
> | |
> +---------------------------------------+
> SQL> select * from rsccc.sr_stu_demo
> SQLRowCount returns -1
> SQL>
>
> Yet isql will return system table information via the 'help' command
> (see SQL below):

No, the reply you quoted showed column headers only, no data.

> Please advise.

Your freetds.conf and odbc.ini look correct to me. I think isql is
swallowing an error from the server. I would try the same query using
bsqldb using TDSDUMP viz:

$ TDSDUMP=stdout bsqldb -S txeis -U dba -P sql

HTH.

--jkl

P.S. Please don't top-post. Inline replies such as I have used here
make the thread of the conversation easier for others to follow.




Archive powered by MHonArc 2.6.24.

Top of Page