var cds:TClientDataSet;
....
try
cds.Post;
except
HERE (***)
end;
....
If Post has a error then the flow cotrol arrives
in module DBTables.pas and explicitely call this
raise EDBEngineError.Create(ErrorCode);
How can I get this ErrorCode in my application
and do something HERE (***)
thanks
Delphi
Last Comment
Computer101
8/22/2022 - Mon
Cesario Lababidi
Hi sica79,
try
cds.Post;
except
OE E: Exception do
ShowMessage( E.Message);
end;
good luck
Cesario
Cesario Lababidi
try
cds.Post;
except
ON E: Exception do
Begin
ShowMessage( E.Message);
End;
end;
mocarts
var
cds: TClientDataSet;
i: integer;
begin
try
cds.Post;
except
on e: EDBEngineError do
begin
for i := 0 to e.ErrorCount -1 do
if e.Errors[i].ErrorCode = CODE_TO_HANDLE then
HandleThisErrorCode;
end;
end;
end;
I found the OnReconcileError event of
the ClientDataSet component.
This Event has a E: EReconcileError parameter
and i used E.ErrorCode to take my error !
thanks
Igor UL7AAjr
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
PAQ/Refund
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
ITugay
CleanupPing
sica79:
This old question needs to be finalized -- accept an answer, split points, or get a refund. For information on your options, please click here-> http:/help/closing.jsp#1
EXPERTS:
Post your closing recommendations! No comment means you don't care.
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:
PAQ and refund points
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
Some days and here is the Christmas Time. I wish good luck and good health for you all and for your loved ones
try
cds.Post;
except
OE E: Exception do
ShowMessage( E.Message);
end;
good luck
Cesario