PDA

Click to See Complete Forum and Search --> : Trap ODBC Error


jaypee
Oct 6th, 1999, 04:48 PM
How to trap ODBC errors. I am using "On error goto last".
But the error reported by ODBC gives like "S1000" which is an alphanumeric whereas On error is a numeric field. Hence unable to compare . In other words whenever I get ODBC error , it simply (error) flashing on the .
HOW DO I TRAP IT???

velkave
Oct 7th, 1999, 03:16 PM
Think most of the ODBC errors come under a major runtime error like 40002, 3146, 3151 etc. You can trap it using both err.number and err.descrption.

rgds
velkave.

jaypee
Oct 7th, 1999, 06:24 PM
thanx for the reply,
But I am using mysql ODBC which indeed gives me err number as "S1000". You can get ODBC driver at www.mysql.com (http://www.mysql.com)