dataSet acceptChanges

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: s-galit (sgalit_at_discussions.microsoft.com)
Date: 09/27/04


Date: Mon, 27 Sep 2004 05:03:01 -0700

when im doing dataSet1.tables(0).acceptChanges the rowChanging event is called
and im getting an error -"cannot find columns 8"
i dont know why im getting this error
can someone tell me what is wrong??

  Private Sub exercise_rowchanging(ByVal sender As Object, ByVal e As
System.Data.DataRowChangeEventArgs)
        
        Dim num1 As New Integer
        Dim num2 As New Integer
        Dim num3 As New Integer
        num1 = e.Row.Item(0)
        num2 = e.Row.Item(1)
        num3 = e.Row.Item(2)
        If CInt(num3) <> CInt(num1) + CInt(num2) Then
        e.Row.RowError = "The result column contians an error"
        e.Row.SetColumnError(e.Action, "Result cannot be " & CStr(num3))
        End If
   End sub

thanks



Relevant Pages

  • Re: DataGrid -> DataTable mapping problem
    ... Thanks for the reply - forgive me if I've mis-read your code - but dont think ... You are getting the data from the datagrid, ... > Private Sub dtbCol1_ToolTip(ByVal sender As Object, ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Checked Listbox help needed
    ... Private Sub CheckedListBox1_ItemCheck(ByVal sender As Object, ... i dont think its possible using normal way. ... > a) dissable a particular item in the checked listbox. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Nwwbie array question
    ... dont you want to use 'index' instead of i? ... > Private Sub mnuAdd_Click(ByVal sender As System.Object, ... > ' Adds image path and filename to array. ...
    (microsoft.public.dotnet.languages.vb)
  • newbie: two projects in the same solution and accessing different forms
    ... i have a few fundamental questions that i dont seem to get an answer: ... Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Problem with Rich Text Box
    ... Great suggestion Randy! ... > the other forum works great like I just said but my Home and End keys dont ... Private Sub rtb1_KeyDown ... > problem working with the Replace function and that thing does nothng like it ...
    (microsoft.public.vb.bugs)