|
From: Markus H. <mar...@mh...> - 2007-08-27 11:45:53
|
Quoting Duncan McQueen <dwm...@gm...>: > Are there any good examples showing proper use of catching an error > from the database driver? As I mentioned - my MinGW compiled program > really blows up when the database doesn't exist - I am just looking > for a basic example as to catching the error. > These are probably not "good" examples, but still: 1) look at the libdbi-drivers/tests/test_dbi.c test program which handles a couple of errors gracefully 2) this is what my other pet project uses to connect to a database (look for connect_to_db()): http://refdb.svn.sourceforge.net/viewvc/refdb/refdb/trunk/src/refdbda.c?revision=461&view=markup hth Markus -- Markus Hoenicka mar...@ca... (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de |