Skip to Content.
Sympa Menu

freetds - Re: [freetds] unixODBC+FreeTDS isql query problems

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] unixODBC+FreeTDS isql query problems
  • Date: Mon, 3 Dec 2007 13:12:49 -0500

Crompton, SY (Shirley) wrote:
>
> > $ TDSVER=7.0 TDSDUMP=stdout isql -S [...] < query.txt > query.log
> >
> > and have a look at query.log. Are there two resultsets (output from
> > two queries)?
>
> Yes, the query.log contains the 2 resultsets as expected.

Hi Shirley,

OK. That means you're communicating with the server. Once that happens,
you're usually done with configuration. And we know the server is
answering your queries. So the basic plumbing works.

> I've directly edited the
> freeTDS.conf file as root. Do I have to install the file with a install
> function?

It's fine to edit freetds.conf as root. (It should be all lowercase
unless you're using the FREETDSCONF environment variable to change the
name of the file the library looks for.) It's not necessary to install
it. The "install" command simply copies things where they belong,
libraries in /usr/lib, executables in /usr/bin, and so on. It doesn't
sprinkle magic pixie dust on the file file and say, "You're installed".
;-)

IIRC your difficulty was that isql accepts any number of queries, but
reports results for only the first one. We still need a TDSDUMP log as a
starting point to figure out what's going on (if we can). Since the last
log was too big, how about doing this instead:

$ export TDSVER=7.0
$ export TDSDUMP=stdout
$ echo 'select 1 as one select 2 as two' \
| isql -S [...] > query.log

We want to see if isql is fetching the second result set or if it's
encountering some kind of error.

One of my complaints about that tool is that it doesn't report all errors.
The current FreeTDS snapshot (available on the website) includes a tool
-- bsqlodbc -- with better diagnostics, if I do say so myself. You might
try that, too, if you're up to it. But let's at least start with trying
to fetch two one-row results.

HTH.

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page