Re: error handling when updating a datasource via a data adapter

From: Joyjit Mukherjee (joyjit_mukherjee_at_hotmail.com)
Date: 09/08/04


Date: Wed, 8 Sep 2004 10:19:30 +0530

Hi,

check this
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdatasqlclientsqldataadapterclassrowupdatedtopic.asp

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
> >
> >
> >



Relevant Pages

  • Re: Probelm with Process and shortcut
    ... works with Process method. ... just first time is slow in ... my case because of the exception throwing. ... > |> Regards. ...
    (microsoft.public.dotnet.framework)
  • Re: Video hangs while its running under Windows CE
    ... S. Pradeep Kumar ... exception when you are running a DEBUG OS with that debugger. ... Exception in device.exe, gwes.exe & filesys.exe. ...
    (microsoft.public.windowsce.embedded)
  • Re: Starting default mail program
    ... mapi32.dll is usually installed with Outlook with MS Office or Microsoft ... Exchange tools. ... Catch ex As Exception ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Get Function & Class Name
    ... compiler can't the macro definition which I understand is because I am ... >>location in my code as to where an exception occurs and for that reason I ... > to illustrate the detailed concerns and code context of your need? ... > Best regards, ...
    (microsoft.public.vc.mfc)
  • Re: Simple webmethod call
    ... if client derive public WS classed from Microsoft.Web.Services2.WebServicesClientProtocol I must throw exception)? ... with best regards ... I have a web app that offer some webmethods. ...
    (microsoft.public.dotnet.framework.webservices.enhancements)