Dataset being overwritten by multiple users?

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

    #1

    Dataset being overwritten by multiple users?

    I've got an aspnet page (vb) that runs a stored procedure, pipes it in
    a dataset, and binds to a gridview. The parameters for the stored
    procedure are some URL variables. My problem is when multiple ( 2 or
    more) people click on this link at the exact same time, the dataset
    seems to be getting overwritten. If person A clicks on their link,
    and person B clicks on theirs at the same time, person A is getting
    Person B's data, and vice versa. I'm almost positive this has
    something to do with multiple accessing the dataset at the same time.
    Is this the case? What's the workaround? TIA
  • Andrew Morton

    #2
    Re: Dataset being overwritten by multiple users?

    Chris wrote:
    Makes sense now. Good ol' hindsight. So what other options do I have
    if I want to put this query in a dataset, but retain the information
    in the dataset after postbacks?
    You can save data in the Session state (but I have a nagging suspicion that
    a dataset is not serializable, so you'd have to figure out a way to get the
    data into something that is, like an ArrayList).

    Andrew


    Comment

    • Mark Rae [MVP]

      #3
      Re: Dataset being overwritten by multiple users?

      "Andrew Morton" <akm@in-press.co.uk.inv alidwrote in message
      news:eUWCQLGhIH A.4320@TK2MSFTN GP06.phx.gbl...
      I have a nagging suspicion that a dataset is not serializable
      Yes it is - I do this all the time for smallish sets of data which (almost)
      never changes e.g. countries, currencies etc...


      --
      Mark Rae
      ASP.NET MVP


      Comment

      • Cowboy \(Gregory A. Beamer\)

        #4
        Re: Dataset being overwritten by multiple users?

        DataSets are XML, which is pretty much what serializable objects are
        serialized to. :-)

        For the record, a DataSet IS serializable.

        --
        Gregory A. Beamer
        MVP, MCP: +I, SE, SD, DBA

        *************** *************** *************** ****
        | Think outside the box!
        |
        *************** *************** *************** ****
        "Andrew Morton" <akm@in-press.co.uk.inv alidwrote in message
        news:eUWCQLGhIH A.4320@TK2MSFTN GP06.phx.gbl...
        Chris wrote:
        >Makes sense now. Good ol' hindsight. So what other options do I have
        >if I want to put this query in a dataset, but retain the information
        >in the dataset after postbacks?
        >
        You can save data in the Session state (but I have a nagging suspicion
        that a dataset is not serializable, so you'd have to figure out a way to
        get the data into something that is, like an ArrayList).
        >
        Andrew
        >

        Comment

        Working...