Catching exception of System.Data.OleDb.OleDbException type

  • Thread starter Thread starter Nits
  • Start date Start date
N

Nits

Hello All,

I wanted to know what kind of exceptions will be catched in the class
type of
System.Data.OleDb.OleDbException

I was expecting the database constraints violations errors will fall
into this type
of exception handling, but it doesnt seem so. And if it cannot catch
these exceptions
then what type will catch database constraints violations errors ?

Thanks,
Nitin.
 
I am using OleDbConnection object and Oracle Provider for OLE DB

The connection string is like this

"Provider=OraOLEDB.Oracle.1;Password=password;
Persist Security Info=True;User ID=User;Data Source =DS;"

Nitin.
 
Try setting a catch block that catches all exceptions and see what type are
they, like:
try
....
catch (Exception ex)
{
// ... check ex's type here
}
An observations: Why don't you use managed Oracle provider?
 

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