Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Not able to update database [modified]

Not able to update database [modified]

Scheduled Pinned Locked Moved Visual Basic
databasehelpannouncement
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    str50
    wrote on last edited by
    #1

    I am not able to update database even though I have the code right from what I know. Any help will be appreciated. Here is the code for add record once changes have been made. Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click If Ds1.HasChanges() Then da1.Update(Ds1) MsgBox("done") Else MsgBox("not done") End If End Sub -- modified at 19:57 Wednesday 26th July, 2006

    M P G 3 Replies Last reply
    0
    • S str50

      I am not able to update database even though I have the code right from what I know. Any help will be appreciated. Here is the code for add record once changes have been made. Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click If Ds1.HasChanges() Then da1.Update(Ds1) MsgBox("done") Else MsgBox("not done") End If End Sub -- modified at 19:57 Wednesday 26th July, 2006

      M Offline
      M Offline
      mtone
      wrote on last edited by
      #2

      Show The rest of the Code. Where is the Update statement? Do you get an error?

      1 Reply Last reply
      0
      • S str50

        I am not able to update database even though I have the code right from what I know. Any help will be appreciated. Here is the code for add record once changes have been made. Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click If Ds1.HasChanges() Then da1.Update(Ds1) MsgBox("done") Else MsgBox("not done") End If End Sub -- modified at 19:57 Wednesday 26th July, 2006

        P Offline
        P Offline
        postmaster programmingknowledge com
        wrote on last edited by
        #3

        did you set the correct permission to the back end? If no error trap and wrong permission then NO update. Postmaster http://www.programmingknowledge.com/[]

        1 Reply Last reply
        0
        • S str50

          I am not able to update database even though I have the code right from what I know. Any help will be appreciated. Here is the code for add record once changes have been made. Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click If Ds1.HasChanges() Then da1.Update(Ds1) MsgBox("done") Else MsgBox("not done") End If End Sub -- modified at 19:57 Wednesday 26th July, 2006

          G Offline
          G Offline
          Guerven
          wrote on last edited by
          #4

          I presume Ds1 is a Dataset, how many tables are there and do each table include a primary key.

          GUERVEN Truth or Consequence

          S 1 Reply Last reply
          0
          • G Guerven

            I presume Ds1 is a Dataset, how many tables are there and do each table include a primary key.

            GUERVEN Truth or Consequence

            S Offline
            S Offline
            str50
            wrote on last edited by
            #5

            i figured out my error. I was not updating the dataset. Thanks for everybody's help on this.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups