蓝
蓝叶菱
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TLNSQL.ExecSql(Astr: string);var ACount: Integer;begin try FStatus := true; FRecordCount := 0; FObjConnection.Execute(Astr, ACount, [eoExecuteNoRecords]); FRecordCount := ACount; except on E:EOleException do begin WriteLog(ltExcept,'错误代码:' + IntToStr(e.ErrorCode) +' 错误信息:'+ E.Message +#13#10+ 'SQL语句:' + Astr); FStatus := false; FIsCanCommit := False; end; end;end;怎么ADO打印出错误的代码???。。。获得ADOQUERY执行的错误代码