Skip to Content.
Sympa Menu

freetds - [freetds] Error handling...

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: James Vanns <jimv AT canterbury.ac.uk>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: [freetds] Error handling...
  • Date: Mon, 19 Jan 2004 18:33:39 +0000

OK, so shoot me but I'm confused by the TDS error handling/catching. I
can see all these directives:

#define TDS_SUCCESS, TDS_FAIL, TDS_CMD_FAIL etc. but where do I use
them? Some even have the same number.

For example, if I send a query to the server with tds_query_submit and
that query fails (incorrect table name say) what would the return code
be? Or is this caught from within tds_process_results or whatever? What
about if the SQL command succeeds but returns no rows what then? I
realise that the err_handler of the TDSCONTEXT structure can print error
messages but what if I actually want to handle the error by using some
code?

Can someone clear this up for me please!

Cheers

James Vanns

--
James Vanns BSc (Hons) MCP
Linux Systems Administrator
Senior Software Engineer (Linux / C & C++)
Canterbury Christ Church University College
Public Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x24045370





Archive powered by MHonArc 2.6.24.

Top of Page