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. Insert/Update statement

Insert/Update statement

Scheduled Pinned Locked Moved Visual Basic
databasesecurityquestionannouncement
8 Posts 6 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
    shefa isied
    wrote on last edited by
    #1

    Hi, I have VB project with Access Database but when i use update statement with no errors but no changes occured in the database. connection string statement is "Provider=Microsoft.ACE.OLEDB.12.0;" & _ "Data Source=App_Data\TrainingDept.mdb" & _ ";Persist Security Info=True" why?

    T J D L 4 Replies Last reply
    0
    • S shefa isied

      Hi, I have VB project with Access Database but when i use update statement with no errors but no changes occured in the database. connection string statement is "Provider=Microsoft.ACE.OLEDB.12.0;" & _ "Data Source=App_Data\TrainingDept.mdb" & _ ";Persist Security Info=True" why?

      T Offline
      T Offline
      Thomas Krojer
      wrote on last edited by
      #2

      'where' clause correct?

      S 1 Reply Last reply
      0
      • T Thomas Krojer

        'where' clause correct?

        S Offline
        S Offline
        shefa isied
        wrote on last edited by
        #3

        yes.Where clause is correct and when i wrote update statement on the access database, the data will be updated but the problem is the update statement in the vb code

        1 Reply Last reply
        0
        • S shefa isied

          Hi, I have VB project with Access Database but when i use update statement with no errors but no changes occured in the database. connection string statement is "Provider=Microsoft.ACE.OLEDB.12.0;" & _ "Data Source=App_Data\TrainingDept.mdb" & _ ";Persist Security Info=True" why?

          J Offline
          J Offline
          John M Bundy
          wrote on last edited by
          #4

          What you posted looks ok, but its hard to tell just by that. The only thing i can offer with what you posted is if you are using 64 bit what you have won't work. ACE isn't supported in 64 bit. Post the entire statement or better yet look into TableAdapters.

          1 Reply Last reply
          0
          • S shefa isied

            Hi, I have VB project with Access Database but when i use update statement with no errors but no changes occured in the database. connection string statement is "Provider=Microsoft.ACE.OLEDB.12.0;" & _ "Data Source=App_Data\TrainingDept.mdb" & _ ";Persist Security Info=True" why?

            D Offline
            D Offline
            Dave Kreskowiak
            wrote on last edited by
            #5

            If you have your Access database in your project, it is possible that every time you compile and run the app, the database being used (in the Debug folder or your project) is being overwritten by the master copy of the database in the project. Any changes you make during one run of your program will be lost the next time you run the app from Visual Studio. Now, if you're looking for changes that were supposed to have been made in one run of the application and you're not seeing them, the possible problems expand to either an incorrect WHERE clause in the SQL (it doesn't find the record(s) to change), or you're not looking at the correct copy of the database for the changes.

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                 2006, 2007, 2008
            But no longer in 2009...

            1 Reply Last reply
            0
            • S shefa isied

              Hi, I have VB project with Access Database but when i use update statement with no errors but no changes occured in the database. connection string statement is "Provider=Microsoft.ACE.OLEDB.12.0;" & _ "Data Source=App_Data\TrainingDept.mdb" & _ ";Persist Security Info=True" why?

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              Do a SELECT with your UPDATE statement's WHERE clause and you should see the reason why your table is not updated.

              L 1 Reply Last reply
              0
              • L Lost User

                Do a SELECT with your UPDATE statement's WHERE clause and you should see the reason why your table is not updated.

                L Offline
                L Offline
                loyal ginger
                wrote on last edited by
                #7

                I like your answer.

                L 1 Reply Last reply
                0
                • L loyal ginger

                  I like your answer.

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #8

                  Like it for what ?

                  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