This is a common scenario. If you're using a DataAdapter, you have the
RowUpdated event which fires after a Row update has *been attempted*,
but before any exception has been thrown. In this method you can check
the RowUpdatedEventArgs.Status property. The fabulous thing is that
this is a Get-Set property, therefore you can check if Errors have
occurred. If so, you can set the Status to "SkipCurrentRow".

Try to avoid going down the unstructured error handling route whenever
possible. There is almost always a better option available. The
probability is that you don't know about it, rather than it being
absent altogether. I have never needed "On Error GoTo" ever since I
moved to .NET !

On Sep 23, 9:39 pm, Mushy <[EMAIL PROTECTED]> wrote:
> Hi guys i need some help i have one application in vb.net where i am
> transfering data from As400 to sql server .At the time of inserting
> data into sqlserver i  want to catch any errors in the records and
> insert into ErrorLog table in the sqlserver. The problem i have is
> since try catch finally block in vb.net is structured and it will
> catch errors and stop .what i want is insteading on stoping i want to
> insert those wrong data records in ErrorLog tavble and continue with
> the next record without stopping. i tried many ways like unsturctured
> mechanism of ON Error Goto,ON Error Resume Next etc but not getting
> exaclty what i need. please help me guys if anyone has gone thru
> similar situation .
>
> Thanks
> With Best Regards
>
> Mushtaq Ilyas
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web 
Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://cm.megasolutions.net/forums/default.aspx
-~----------~----~----~----~------~----~------~--~---

Reply via email to