Re: osql and isql -- how to test ODBC config?
"James K. Lowden" <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 13 Sep 2012 14:35:03 +0000 Tony Esposito <[email protected]> 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.