Getting error messages to the (PHP) user

"Mark A. Hershberger" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.