Skip to Content.
Sympa Menu

freetds - [freetds] Getting error messages to the (PHP) user

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Mark A. Hershberger" <mah AT everybody.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: [freetds] Getting error messages to the (PHP) user
  • Date: Tue, 05 Mar 2013 09:18:31 -0500

Yesterday, I thought that the problem of getting error messages back to
PHP was something that I had to solve on the PHP side. After a little
more digging into the FreeTDS code, I'm not so sure.

The messages from SQL Server are shown in the debug log, but all that I
see on the PHP side is "General SQL Server error: Check messages from
the SQL Server".

I found that _dblib_handle_info_message() in dbutil.c handles both
actions: logging the actual SQL Server error message and returning the
hard-coded error message ("General SQL Server error...").

This hard-coded error message seems pretty useless to me -- especially
when the actual error message is right there. Is there a reason it was
done this way?

--
http://hexmode.com/

Many that live deserve death. And some that die deserve life. Can you
give it to them? Then do not be too eager to deal out death in
judgment. For even the very wise cannot see all ends.
-- J.R.R. Tolkien, The Fellowship of the Ring




Archive powered by MHonArc 2.6.24.

Top of Page