Results 1 to 5 of 5

Thread: Update a Database through Dataset [Resolved]

Threaded View

  1. #1

    Thread Starter
    Frenzied Member FishGuy's Avatar
    Join Date
    Mar 2005
    Location
    Bradford UK
    Posts
    1,708

    Resolved Update a Database through Dataset [Resolved]

    Im sure I had this working before but now it only appears to work i.e the text box updates and the code doesnt error, but the change isnt reflected in the database. Basically all I have is a text box bound to a dataset, the user can edit the text box and on clicking the button it should update the database through the data adapter.

    VB Code:
    1. Private Sub btnUpdateCont_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdateCont.Click
    2.  
    3.         Me.SqlDataAdapter1.Update(DsUser1)
    4.         DsUser1.AcceptChanges()
    5.         Me.lblChanged.Text = "Detail Changes Successful"
    6.     End Sub

    or does this just update the dataset and not the database? If not what is the code for doing so? pls.
    Last edited by FishGuy; May 11th, 2005 at 04:27 AM. Reason: Resolved

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width