types of sql exception

  • Thread starter Thread starter claire
  • Start date Start date
C

claire

Hi,

I have a windows form with a typed dataset. When i call an update on the
database i want to catch the exceptions. I was wondering what different
types of sql exceptions there are.

Also i was told that the order that you catch them is important. If so, what
sort of order is this?

Thank you for your time.

Claire
 
Hi Claire,


claire said:
Hi,

I have a windows form with a typed dataset. When i call an update on the
database i want to catch the exceptions. I was wondering what different
types of sql exceptions there are.

SqlException?

I'm reading now that it is not generated on .NET 1.0 though.
Also i was told that the order that you catch them is important. If so, what
sort of order is this?

From the more especific to the more general, for example you put a catch
clause for SqlException and later one for Exception, it the exception is not
of type of SqlException or one of his derived classes it will jump to the
next catch clause , if the last clause is for Exception it will match all
the exceptions.



Cheers,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top