重複キー違反をキャッチしようとしています。Intellisense ポップアップに System.OleDB.OleDBException が表示されますが、内部例外は null です。System.OleDB.OleDBException のエラー コードにアクセスするにはどうすればよいですか?
グレッグ
try
{
MyData.ConExec(sSQL);
}
catch (Exception ex)
{
OleDbException innerException = ex.InnerException as OleDbException;
if (innerException.ErrorCode == -2147217873)
{
// handle exception here..
}
else
{
throw;
}
}