[freetds] Empty Error Messages

James K. Lowden jklowden at freetds.org
Mon May 5 18:41:13 EDT 2008


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



More information about the FreeTDS mailing list