$Err = ObjEvent("AutoIt.Error", "ODBCJET_ErroHandler") ;定义一个函数ODBCJET_ErroHandler收集对象的错误
Func ODBCJET_ErroHandler();Com对象错误信息收集函数
MsgBox(0,"Intercepted Sql Error !", @CRLF &"Intercepted Sql Error !" & @CRLF & _
"err.description is: " & @TAB & $Err.description & @CRLF & _
"err.windescription:" & @TAB & $Err.windescription & @CRLF & _
"err.number is: " & @TAB & hex($Err.number,8) & @CRLF & _
"err.lastdllerror is: " & @TAB & $Err.lastdllerror & @CRLF & _
"err.source is: " & @TAB & $Err.source & @CRLF & _
"err.helpfile is: " & @TAB & $Err.helpfile & @CRLF & _
"err.helpcontext is: " & @TAB & $Err.helpcontext & @CRLF)
SetError(1)
EndFunc ;==>ODBCJET_ErroHandler
|