catch EMSError
Posted: Fri 03 Jun 2005 12:25
Hi,
I use SDAC with D7 and now I have a problem with processing error events if occured.
So, I have something like that:
//**************************
try
TMSQuery(ExecQuery).Execute;
except
on E : EMSError do
begin
for I := 0 to E.ErrorCount - 1 do // Iterate
ShowMessage(E.Errors.Message);
end
else
ShowMessage('Unknown Error')
end;
//**************************
And I get 'Unknown Error' message every time error occures. An that is a problem.
I've found that EAbort error object throwed every time in this function.
Is it known issue? Can anyone help?
p.s.
In SDAC Help I found description for EOLEDBError object and there is a text : "Keep in mind, if MSConnection.Connect was called from another thread than this event, the text of the message can be incomplete."
May be it is a key for solving because of I use different threads in my application?
I use SDAC with D7 and now I have a problem with processing error events if occured.
So, I have something like that:
//**************************
try
TMSQuery(ExecQuery).Execute;
except
on E : EMSError do
begin
for I := 0 to E.ErrorCount - 1 do // Iterate
ShowMessage(E.Errors.Message);
end
else
ShowMessage('Unknown Error')
end;
//**************************
And I get 'Unknown Error' message every time error occures. An that is a problem.
I've found that EAbort error object throwed every time in this function.
Is it known issue? Can anyone help?
p.s.
In SDAC Help I found description for EOLEDBError object and there is a text : "Keep in mind, if MSConnection.Connect was called from another thread than this event, the text of the message can be incomplete."
May be it is a key for solving because of I use different threads in my application?