sql server - Different ErrorCount in Windows xp and windows 7 -
i working delphi 7,bde components, , sql server.
i have customer table columns no, name , age. not supposed update name in trigger have added check: if customer name has changed raise error.
if try update name within sql server trigger throws error:
msg ******, level 16, state 1, procedure showerror, line 1456 customer name can not changed. if want change please contact associate manager or whoever has authority. please not consider if not want change. msg 3609, level 16, state 1, line 1 transaction ended in trigger. batch has been aborted.
now in delphi if try update name in customer table error handling code below.
issue: when running under xp errorcount 3, under windows 7 4. showmessage() output:
windows xp:
1) general sql error.
2) customer name can not changed. if want change please contact associate manager or whoever has
autho. <-- autho displaying in second line here
3) the transaction ended in trigger. batch has been aborted.
windows 7:
1) general sql error.
2) customer name can not changed. if want change please contact associate manager or whoever has.
3) authoè¸ö
4) the transaction ended in trigger. batch has been aborted.
code:
try post; except on e:edbengineerror begin // below line displaying different results. showmessage('total errors: '+inttostr(e.errorcount)); := 0 e.errorcount - 1 e.errors[i] begin if nativeerror = 0 begin end else begin sdatabaseerror := sdatabaseerror + message + #13#10; end; end; if sdatabaseerror <> '' messagedlg('error is: ' + #13#10 + sdatabaseerror , mterror, [mbok], 0); end; end;
as result not able differentiate how display errors user.
Comments
Post a Comment