Board index » delphi » ADO Error Trapping examples

ADO Error Trapping examples

Hi All,
Can anyone point me to some examples, articles that would deal with
trapping errors on ADO commands?

Thanks.

Chris

 

Re:ADO Error Trapping examples


Quote
>Can anyone point me to some examples, articles that would deal with
>trapping errors on ADO commands?

Just examine the TadoConnection.errors collection

  For i:=0 To ADOConnection.Errors.Count-1 Do Begin
    ...
    ... ADOConnection.Errors[i].Source ...
    ... ADOConnection.Errors[i].Description ...
    ... ADOConnection.Errors[i].SQLState ...
    ...
    End;

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Re:ADO Error Trapping examples


Hello Everyone,

Just a small thing i ran into. If you want to examine the
TAdoConnection.Errors collection, you have to upgrade you MDAC to version
2.6 SP1 (2.61.7326.6). In previous versions you will not get values for
Source and Description.

HTH,

Harald Bessels.

Brian Bushay TeamB <BBus...@Nmpls.com> wrote in message
news:3dnrntgj66v0vs58tnfajc3qoievsnh1er@4ax.com...

Quote

> >Can anyone point me to some examples, articles that would deal with
> >trapping errors on ADO commands?

> Just examine the TadoConnection.errors collection

>   For i:=0 To ADOConnection.Errors.Count-1 Do Begin
>     ...
>     ... ADOConnection.Errors[i].Source ...
>     ... ADOConnection.Errors[i].Description ...
>     ... ADOConnection.Errors[i].SQLState ...
>     ...
>     End;

> --
> Brian Bushay (TeamB)
> Bbus...@NMPLS.com

Re:ADO Error Trapping examples


Quote
>Just a small thing i ran into. If you want to examine the
>TAdoConnection.Errors collection, you have to upgrade you MDAC to version
>2.6 SP1 (2.61.7326.6). In previous versions you will not get values for
>Source and Description.

I believe this was only a problem in the original release of 2.6 when the
locale was set different from the System  locale

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Other Threads