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. C#
  4. Update Dataset from SQL Server

Update Dataset from SQL Server

Scheduled Pinned Locked Moved C#
questiondatabasesql-serversysadmindiscussion
3 Posts 2 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.
  • A Offline
    A Offline
    Adam m Nelson
    wrote on last edited by
    #1

    I have an application that loads a dataset into a drop down menu in a DataGridView. Separately you can add or remove information from the SQL server that the dataset is populated from. How do I update the dataset once the program is already running? (Assuming I have added information to the SQL table) I have played around, and it seems that the dataset may be complied when the app starts, I could be wrong. Any thoughts are appreciated, Adam

    --Its not broken if it never worked.

    P 1 Reply Last reply
    0
    • A Adam m Nelson

      I have an application that loads a dataset into a drop down menu in a DataGridView. Separately you can add or remove information from the SQL server that the dataset is populated from. How do I update the dataset once the program is already running? (Assuming I have added information to the SQL table) I have played around, and it seems that the dataset may be complied when the app starts, I could be wrong. Any thoughts are appreciated, Adam

      --Its not broken if it never worked.

      P Offline
      P Offline
      pmarfleet
      wrote on last edited by
      #2

      There must be some code that initially loads the dataset. You should figure out where that is. Once you have, you can call this code from somewhere else in your application to reload it.

      Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

      A 1 Reply Last reply
      0
      • P pmarfleet

        There must be some code that initially loads the dataset. You should figure out where that is. Once you have, you can call this code from somewhere else in your application to reload it.

        Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

        A Offline
        A Offline
        Adam m Nelson
        wrote on last edited by
        #3

        Yeah.... The DataGridView allows you to select the dataset in the "properties" window, and doesn't allow you access to the code behind it.. at least that I can find. I've tried all the datagridview.load .update and dataset.load .update combinations that I can think of, but none seem to have an effect. The program doesn't lock up, it just doesn't update the dataset.

        --Its not broken if it never worked.

        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