我在Adoquery的PostError中寫如下代碼時提示Invalid class typecast錯誤,要怎麼解決.
if (E as EDBEngineError).Errors[0].Errorcode=eKeyViol then
我在前面已經定義:
Const
eKeyViol=9729;
我看了很多例子都是這樣的,我運行總是錯誤.
...全文
484打赏收藏
這個Adoquery的錯誤如何解決
我在Adoquery的PostError中寫如下代碼時提示Invalid class typecast錯誤,要怎麼解決. if (E as EDBEngineError).Errors[0].Errorcode=eKeyViol then 我在前面已經定義: Const eKeyViol=9729; 我看了很多例子都是這樣的,我運行總是錯誤.
EDBEngineError is the exception class for Borland Database Engine errors.
Unit
DBTables//单元名
Description
EDBEngineError is raised whenever a BDE error occurs. Its Errors property contains TDBError objects.
When EDBEngineError exceptions are raised at design time, they appear in a special dialog (TDbEngineErrorDlg) that displays the complete stack of BDE errors. At runtime, unhandled EDBEngineError exceptions generate the same message box as other exceptions.