Skip to Content.
Sympa Menu

freetds - Re: [freetds] Empty Error Messages

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] Empty Error Messages
  • Date: Mon, 5 May 2008 18:41:13 -0400

Wojtak, Greg wrote:
> If our php application queries the database and generates an
> error, freetds doesn't seem to pass the error message back to the php
> app.
>
> It looks like we are getting the following back whenever this happens:
> (00000, 0, (null) [0] (severity 0) [(null)], 0, 0)

If you're not getting *any* error messages, something basic is wrong. Try
the same query in bsqlodbc if you want to know if it works correctly.

There are places in the FreeTDS ODBC implentation were an error code is
returned without producing an associated message. Usually they're
more-or-less rare conditions, e.g. when a function is being used
incorrectly in a weird way.

When I encounter something like that, I turn on logging to see which
function had the problem -- it's usually not too hard to spot -- and then
look at the source. Sometimes the error is logged but not "messaged";
sometimes there's a FIXME note in the source. Whether or not I fix the
code, it normally points me back to my own code, which wasn't using the
library as intended.

If you can narrow it down to the use of one function and the error code it
should produce, please say so, so we can fix it.

HTH.

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page