Help with asynchronous download problem?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sherifffruitfly

    #1

    Help with asynchronous download problem?

    Hi,

    I'm using a provided api to download some information (from Bloomberg),
    which goes into a dataset. I want to save the dataset info back into
    the database.

    The problem is that the dataAdapter.upd ate gets called before the
    dataset is done being populated with downloaded info.

    An awful workaround is me popping up a messagebox, letting the user
    decide when to continue program execution.

    I'd like something more elegant - basically, some kind of
    "notificati on" that the dataset has been filled. Are there any standard
    ways of achieving this?

    thanks!

  • Peter Bromberg [C# MVP]

    #2
    RE: Help with asynchronous download problem?

    sherrifffruitfl y,
    This doesn't "sound" asynchronous at all. If it really is, you'll have a
    callback method that completes the dataset and at the end of that method, and
    only when the DataSet is completely loaded, you would be saving the data into
    the database.

    Do you want to post a "Short but complete" (a -la Jon Skeet) example code
    snippet so we can get a better idea of what may be really going on?
    Peter

    --
    Co-founder, Eggheadcafe.com developer portal:

    UnBlog:





    "sherifffruitfl y" wrote:
    Hi,
    >
    I'm using a provided api to download some information (from Bloomberg),
    which goes into a dataset. I want to save the dataset info back into
    the database.
    >
    The problem is that the dataAdapter.upd ate gets called before the
    dataset is done being populated with downloaded info.
    >
    An awful workaround is me popping up a messagebox, letting the user
    decide when to continue program execution.
    >
    I'd like something more elegant - basically, some kind of
    "notificati on" that the dataset has been filled. Are there any standard
    ways of achieving this?
    >
    thanks!
    >
    >

    Comment

    • sherifffruitfly

      #3
      Re: Help with asynchronous download problem?


      Peter wrote:
      Do you want to post a "Short but complete" (a -la Jon Skeet) example code
      snippet so we can get a better idea of what may be really going on?
      Peter
      I have no idea who/what Jon Skeet is, but I know what "minimal example"
      means (LaTex :) ).

      I'm happy to post some such, but it'll have to be tomorrow, as the code
      is at work.

      If you're able to check back then, that'd be wonderful - thanks!

      cdj

      Comment

      • Peter Bromberg [C# MVP]

        #4
        Re: Help with asynchronous download problem?

        Edification link:

        Peter
        --
        Co-founder, Eggheadcafe.com developer portal:

        UnBlog:





        "sherifffruitfl y" wrote:
        >
        Peter wrote:
        >
        Do you want to post a "Short but complete" (a -la Jon Skeet) example code
        snippet so we can get a better idea of what may be really going on?
        Peter
        >
        I have no idea who/what Jon Skeet is, but I know what "minimal example"
        means (LaTex :) ).
        >
        I'm happy to post some such, but it'll have to be tomorrow, as the code
        is at work.
        >
        If you're able to check back then, that'd be wonderful - thanks!
        >
        cdj
        >
        >

        Comment

        Working...