Re: error handling when updating a datasource via a data adapter
From: Joyjit Mukherjee (joyjit_mukherjee_at_hotmail.com)
Date: 09/08/04
- Next message: gozza: "Cast output parameter from SqlGuid to Guid"
- Previous message: Kristin: "DataRelation's Nested property is seemingly ignored"
- In reply to: matthew c. harad: "Re: error handling when updating a datasource via a data adapter"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 8 Sep 2004 10:19:30 +0530
Hi,
Regards
Joyjit
"matthew c. harad" <matthewcharad@discussions.microsoft.com> wrote in
message news:E1D913A5-2823-4452-87F2-B1CA159B379A@microsoft.com...
> thanks. i'm declaring the data adapter in code. how do i create an event
> handler for that event (never done it before).
>
> appreciated,
> matthew
>
> "Joyjit Mukherjee" wrote:
>
> > Hi,
> >
> > trap the DataAdapters RowUpdated event, theres a Error property which is
a
> > exception object that you can look for the type of error.
> >
> > HTH
> > Regards
> > Joyjit
> >
> > "matthew c. harad" <matthewcharad@discussions.microsoft.com> wrote in
> > message news:41F256C1-C215-42D3-BB04-CED6C1EFDCAE@microsoft.com...
> > > i'm updating a table using a data adapter and stored procedure as it's
> > > insert/update commands.
> > >
> > > in certain cases, i would like the stored procedure to throw an
exception
> > > and fail -- or just return an error, and then i want to catch the
> > exception
> > > at the .net application layer.
> > >
> > > how is the best way to handle this? i don't mind if the entire update
> > > fails, rather than just one of the updated rows in the dataset. i
would
> > just
> > > like to handle it simply. i wasn't successful with the docs on this
one.
> > >
> > > much appreciated,
> > > matthew
> >
> >
> >
- Next message: gozza: "Cast output parameter from SqlGuid to Guid"
- Previous message: Kristin: "DataRelation's Nested property is seemingly ignored"
- In reply to: matthew c. harad: "Re: error handling when updating a datasource via a data adapter"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|