Re: CommandBuilder bringt Fehlermeldung!



Hallo Jens,

Wie kann ich die InnerExcepion oder die DB-spezifische Errors-Auflistung abrufen?
... catch (Exception ex)

Für die OleDb-Provider also z.B. Access-DB ist hier ein Beispiel, wie man die Errors-Auflistung abruft:

[OleDbException Class]
http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemdataoledboledbexceptionclasstopic.asp


catch (Exception ex)

Einfach die InnerException von 'ex' aufrufen, z.B. : catch (Exception ex) { if (ex.InnerException != null) MessageBox.Show(ex.InnerException.Message) }

[Exception.InnerException-Eigenschaft]
http://msdn.microsoft.com/library/DEU/cpref/html/frlrfsystemexceptionclassinnerexceptiontopic.asp


ciao Frank
--
Dipl.Inf. Frank Dzaebel [MCP/MVP C#]
http://Dzaebel.NET


.



Relevant Pages


Loading