Board index » delphi » Catching errors

Catching errors


2006-01-16 01:29:30 PM
delphi138
Hi
I am using a TAdoCommand to update a record in an access database.
Is there a way to catch an error in the database within my application when
using TAdoCommand if the record has been updated by another user or if the
record has been deleted?
Thanks
Colin
 
 

Re:Catching errors

Colin writes:
Quote
Hi

I am using a TAdoCommand to update a record in an access database.

Is there a way to catch an error in the database within my
application when using TAdoCommand if the record has been updated by
another user or if the record has been deleted?

Thanks

Colin
assuming you want to show the user the error message sent by Access on
doing it, have you tried checking the ADOConnection.Errors for messages
on database errors?
--
Best regards :)
Guillem Vicens Meier
Dep. Informatica Green Service S.A.
www.clubgreenoasis.com
 

Re:Catching errors

OK Thanks. Using a TAdoCommand seems to be almost brutal. I will try the
TAdoDataSet option.
regards
Colin
"Brian Bushay TeamB" <XXXX@XXXXX.COM>writes
Quote
>I am using a TAdoCommand to update a record in an access database.
>
>Is there a way to catch an error in the database within my application
>when
>using TAdoCommand if the record has been updated by another user or if the
>record has been deleted?
No. You won't get any errors from a TadoCommand to update or delete if
the
records don't exist.
If you want that kind of errors generated you should use a TadoDataset and
add
and delete your records there
--
Brian Bushay (TeamB)
XXXX@XXXXX.COM