From: "Jenny Christy" <[EMAIL PROTECTED]> > I m using mysql server and myodbc driver in linux. > > I wud like to print the correct error message if any > error occur while we r communicating with server eg. > access denied, connection failure, no data is > available , table does not exits, duplicate data > etc. > > How can i see the return error code value and which > file contains all these error codes?? > > I m using function SQLGetDiagRec() to see the error > messages, Can i use the same for error code?
I don't know about anything included in the MyODBC driver, but included with the server is a program called perror that takes a MySQL error code and returns an explanation of it. Usage: [mike@localhost ~]$ perror 13 Error code 13: Permission denied [mike@localhost ~]$ perror 27 Error code 27: File too large Does that help, maybe with a system() or backticks call? -- Mike Johnson . : . : . AIM: denonymous http://www.coldcircuit.net ' : ' : ' http://65.96.177.11 "According to one of our readers, the new MacOS X contains another Satanic holdover from the 'BSD Unix' OS mentioned above; to open up certain locked files one has to run a program much like the DOS prompt in Microsoft Windows and type in a secret code: 'chmod 666'." --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php