Re: error handling when updating a datasource via a data adapter
From: matthew c. harad (matthewcharad_at_discussions.microsoft.com)
Date: 09/07/04
- Next message: Paul Clement: "Re: oledb version problem in connection string vb.net"
- Previous message: ToddT: "Re: help setting up factory design pattern"
- In reply to: Joyjit Mukherjee: "Re: error handling when updating a datasource via a data adapter"
- Next in thread: Joyjit Mukherjee: "Re: error handling when updating a datasource via a data adapter"
- Reply: Joyjit Mukherjee: "Re: error handling when updating a datasource via a data adapter"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 7 Sep 2004 08:47:09 -0700
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: Paul Clement: "Re: oledb version problem in connection string vb.net"
- Previous message: ToddT: "Re: help setting up factory design pattern"
- In reply to: Joyjit Mukherjee: "Re: error handling when updating a datasource via a data adapter"
- Next in thread: Joyjit Mukherjee: "Re: error handling when updating a datasource via a data adapter"
- Reply: Joyjit Mukherjee: "Re: error handling when updating a datasource via a data adapter"
- Messages sorted by: [ date ] [ thread ]