Catching multiple errors with async execution



Hi all,
I am using a TADOCommand to run SQL commands against an SQL Server. I have
set ExecuteOptions to [eoAsyncExecute,eoExecuteNoRecords] for async
execution. I am trying to handle errors that the SQL command may generate by
adding handler to TADOConnection's OnExecuteComplete error. I am having
problems executing a command like this:

print "Creating table..."

create table XXX ...

If my "create table" statement fails, my OnExecuteComplete event handler
receives one error, and it is not the "create table" error but rather the
message from the "print" statement. Also ADOConnection.Errors collection is
empty.

Is there any way to find out about the real error in the second statement?

Thanks,
Leonid


.