ADO的错误可以直接返回给用户,只要MDAC是中文的
procedure TDMForm.DataSetPostError(DataSet: TDataSet; E: EDatabaseError;
var Action: TDataAction);
//提交错误
begin
if Application.MessageBox(SEPostData+#13#13+format(SErrorMessage,[e.message])+#13#13+
SQCancelEdit,SError,MB_YESNO+MB_ICONQUESTION)=ID_YES then
DataSet.Cancel;
Action:=daAbort;
end;