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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. How to refill a dataset?

How to refill a dataset?

Scheduled Pinned Locked Moved Visual Basic
questioncsharphelptutorial
4 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.
  • C Offline
    C Offline
    cstrader232
    wrote on last edited by
    #1

    I have this code in my vb.net program. Me.TickersTableAdapter.Fill(Me.DataSet1.Tickers) It fills the data from the external file fine. However, I'd like to be able to refill the data after it has been changed by an external program. Calling the line a second time doesn't work because I get "datareader already active on this command" error. How can I refill the data from the external file? tia

    D K 2 Replies Last reply
    0
    • C cstrader232

      I have this code in my vb.net program. Me.TickersTableAdapter.Fill(Me.DataSet1.Tickers) It fills the data from the external file fine. However, I'd like to be able to refill the data after it has been changed by an external program. Calling the line a second time doesn't work because I get "datareader already active on this command" error. How can I refill the data from the external file? tia

      D Offline
      D Offline
      Dave Sexton
      wrote on last edited by
      #2

      create another data adapter?

      C 1 Reply Last reply
      0
      • D Dave Sexton

        create another data adapter?

        C Offline
        C Offline
        cstrader232
        wrote on last edited by
        #3

        Sorry, that doesn't make sense to me. I have one dataset that I want to keep updated. The dataset can be updated by an external program. I would like to refresh the dataset by re-reading it periodically to reflect those external changes. This seems like it must be possible using only one data adapter. But maybe I'm missing something. thanks for your response!

        1 Reply Last reply
        0
        • C cstrader232

          I have this code in my vb.net program. Me.TickersTableAdapter.Fill(Me.DataSet1.Tickers) It fills the data from the external file fine. However, I'd like to be able to refill the data after it has been changed by an external program. Calling the line a second time doesn't work because I get "datareader already active on this command" error. How can I refill the data from the external file? tia

          K Offline
          K Offline
          karansharma
          wrote on last edited by
          #4

          first of all make a function to fill dataset . then whenever u want to reload ur dataset , call ur function . but dont forget to clear the table(Tickers) in which it is going to load b4 calling the function . i hope it might work for u .

          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