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. how to reload database?

how to reload database?

Scheduled Pinned Locked Moved Visual Basic
questiondatabasetutorialannouncement
7 Posts 3 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.
  • L Offline
    L Offline
    Lisana
    wrote on last edited by
    #1

    I have a main page shows all the results in the datagrid. and there is an Add button to pop up another form to add data to it. when I finish adding data and close the form, the main form database doesn't update the data has been added or edited. How can I ask the main form to reload the lastest data when the database has been changed? Is there any way to do it? Thanks! Lisa

    N M 2 Replies Last reply
    0
    • L Lisana

      I have a main page shows all the results in the datagrid. and there is an Add button to pop up another form to add data to it. when I finish adding data and close the form, the main form database doesn't update the data has been added or edited. How can I ask the main form to reload the lastest data when the database has been changed? Is there any way to do it? Thanks! Lisa

      N Offline
      N Offline
      numbrel
      wrote on last edited by
      #2

      You can add a "Reload" button or menu option and then write the code to query the database and reload your datagrid.

      L 1 Reply Last reply
      0
      • N numbrel

        You can add a "Reload" button or menu option and then write the code to query the database and reload your datagrid.

        L Offline
        L Offline
        Lisana
        wrote on last edited by
        #3

        is the reload button has to be in the same form as the datagrid? can I ask the other form when the Add buton click, then to reload main form's datagrid? what's the code for the datagrid reload? is it datagril.reload()? Lisa

        N 1 Reply Last reply
        0
        • L Lisana

          is the reload button has to be in the same form as the datagrid? can I ask the other form when the Add buton click, then to reload main form's datagrid? what's the code for the datagrid reload? is it datagril.reload()? Lisa

          N Offline
          N Offline
          numbrel
          wrote on last edited by
          #4

          Sorry, I don't know that much about datagrids but I assume that when the datagrid first appears it is populated with the info from database as it is at that moment. You didn't say whether you are using VB or VB.NET. For VB.NET if you want the updated information, you have to clear and fill the dataSet again in order for the new information to show up in the datagrid. Whether it would work from another form, you'll have to try it and see. For VB I assume you would do whatever you did to populate the datagrid originally.

          1 Reply Last reply
          0
          • L Lisana

            I have a main page shows all the results in the datagrid. and there is an Add button to pop up another form to add data to it. when I finish adding data and close the form, the main form database doesn't update the data has been added or edited. How can I ask the main form to reload the lastest data when the database has been changed? Is there any way to do it? Thanks! Lisa

            M Offline
            M Offline
            Moh_Amer
            wrote on last edited by
            #5

            I have a main page shows all the results in the datagrid. and there is an Add button to pop up another form to add data to it. when I finish adding data and close the form, the main form database doesn't update the data has been added or edited. How can I ask the main form to reload the lastest data when the database has been changed? Is there any way to do it? Thanks!

            M 1 Reply Last reply
            0
            • M Moh_Amer

              I have a main page shows all the results in the datagrid. and there is an Add button to pop up another form to add data to it. when I finish adding data and close the form, the main form database doesn't update the data has been added or edited. How can I ask the main form to reload the lastest data when the database has been changed? Is there any way to do it? Thanks!

              M Offline
              M Offline
              Moh_Amer
              wrote on last edited by
              #6

              I have a main page shows all the results in the datagrid. and there is an Add button to pop up another form to add data to it. when I finish adding data and close the form, the main form database doesn't update the data has been added or edited. How can I ask the main form to reload the lastest data when the database has been changed? Is there any way to do it? Thanks! Mohammed Amer

              L 1 Reply Last reply
              0
              • M Moh_Amer

                I have a main page shows all the results in the datagrid. and there is an Add button to pop up another form to add data to it. when I finish adding data and close the form, the main form database doesn't update the data has been added or edited. How can I ask the main form to reload the lastest data when the database has been changed? Is there any way to do it? Thanks! Mohammed Amer

                L Offline
                L Offline
                Lisana
                wrote on last edited by
                #7

                recall the function after the data add. Lisa -- modified at 8:51 Monday 8th May, 2006

                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