It's the same with interbase (or any other other db that I know of). You must parse the string to determine the error number and case it. It would be nice if the exception told you the error number or there were differnt classes of exceptions for each error. >From: "Donovan J. Edye" <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: Multiple recipients of list delphi <[EMAIL PROTECTED]> >Subject: RE: [DUG]: Best Error Handling Strategy for ADO & SQL7.... >Date: Wed, 1 Mar 2000 08:47:02 +1100 > >N, > >Well I was wondering about the TADOConnection.dbDatabaseInfoMessage(). >Should that be used instead of EADOError?? > >Say I am attempting to trap a foreign key violation. The only way to >determine the error number returned by SQL7 is to parse the string. Seems >rather messy. > >Perhaps a better question is. Can you give me sample of your code to show >me >how you deal with errors?? > >TIA > >------------------------------------------------------------------------ >--Donovan >Donovan J. Edye [www.edye.wattle.id.au] >Namadgi Systems, Delphi Developer >Web: www.namsys.com.au E-Mail: [EMAIL PROTECTED] >Voice: +61 2 6285-3460 Fax: +61 2 6285-3459 >TVisualBasic = Class(None); >------------------------------------------------------------------------ > > >-----Original Message----- >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On >Behalf Of Neven MacEwan >Sent: Wednesday, 1 March 2000 08:21 >To: Multiple recipients of list delphi >Subject: Re: [DUG]: Best Error Handling Strategy for ADO & SQL7.... > > >Donovan > >What do you want to achieve? Currently it raises an exception > >Regards >Neven > >----- Original Message ----- >From: Donovan J. Edye <[EMAIL PROTECTED]> >To: Multiple recipients of list delphi <[EMAIL PROTECTED]> >Sent: Tuesday, 29 February 2000 18:47 >Subject: [DUG]: Best Error Handling Strategy for ADO & SQL7.... > > > > G'Day, > > > > Can someone please suggest the most robust error handling mechanism for >ADO > > & SQL7? Should I merely be trapping EADOError exceptions or is there a > > better way?? Say for instance I would like to trap a foreign key >violation > > (Error #547) what is the most elegant way to do this?? > > > > TIA > > > > ------------------------------------------------------------------------ > > --Donovan > > Donovan J. Edye [www.edye.wattle.id.au] > > Namadgi Systems, Delphi Developer > > Web: www.namsys.com.au E-Mail: [EMAIL PROTECTED] > > Voice: +61 2 6285-3460 Fax: +61 2 6285-3459 > > TVisualBasic = Class(None); > > ------------------------------------------------------------------------ > > > > >-------------------------------------------------------------------------- >- > > New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] > > Website: http://www.delphi.org.nz > > > >--------------------------------------------------------------------------- > New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] > Website: http://www.delphi.org.nz > >--------------------------------------------------------------------------- > New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] > Website: http://www.delphi.org.nz ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz