2 Replies - 274 Views - Last Post: 18 January 2013 - 07:54 PM Rate Topic: -----

#1 Des DC  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 20
  • Joined: 28-December 12

Cannot update value

Posted 18 January 2013 - 07:47 PM

Hi all,
here is my code.
With DGVMargin
            For i As Integer = 0 To .Rows.Count - 1
                If txttype.Text = "NORMAL" Then
                    If txtDiscount.Text = .Rows(i).Cells("DiscountNormal").Value Then
                        decodeDiscount()
                        Updatefunction()
                        Exit For
                    Else
                        decodeDiscount()
                        Insert()
                        Exit For
                    End If
  Next
        End With

Now i want to update the txtDiscount value if it is already exist,else it will go to insert a new data.
Now the problem is it will not going to update the value even already have the same txtDiscount value. The system will always go to the Insert() function. It will not go Updatefunction to update the value.
Is there any problem or mistake in my code?
Your help is appreciated. Thanks.

Is This A Good Question/Topic? 0
  • +

Replies To: Cannot update value

#2 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10564
  • View blog
  • Posts: 39,091
  • Joined: 27-December 08

Re: Cannot update value

Posted 18 January 2013 - 07:50 PM

This isn't an advanced discussion topic. Moved to VB.NET. Please don't post help questions in the Advanced Discussion forum.
Was This Post Helpful? 0
  • +
  • -

#3 Des DC  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 20
  • Joined: 28-December 12

Re: Cannot update value

Posted 18 January 2013 - 07:54 PM

sorry admin.I just notice posted in wrong place.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1