Persist data in XML data island

Discussion in 'ASP .Net' started by Pat Alessi, May 25, 2004.

  1. Pat Alessi

    Pat Alessi Guest

    I want to use an XML data island to display editable records to a user
    on the cleint side. The user should be able to scroll through the
    records, modify any or all fields in any or all records, add records,
    and delete records.

    As far as I can see, there are a couple of ways to implement this. I
    could persist the original data island and create a duplicate data
    island that the user would modify. When the modifications were
    complete, I could post back both XML snippets and compare them to see
    what has changed.

    Alternatively, I was thinking about using the DiffGram idea, where
    each change would add an xml element to an xml snippet that would
    indicate what item was changed, added, deleted, etc.

    I know that I am not the first person to want to use this type of
    technique, so I was hoping that there is something built into the .Net
    framework to help with the management of the data. Ideally, I would
    like to do something like serialize a dataset to XML, send it to the
    client as an XML data island, have them manipulate it, repost it, and
    then turn it "magically" into a batch update to the dataset on the
    server side. Is that possible, or do I have to roll my own solution?

    Thanks.

    Pat
     
    Pat Alessi, May 25, 2004
    #1
    1. Advertising

  2. Pat Alessi

    Rick Spiewak Guest

    If you read the XML back into a dataset, then you can use .getchanges on the
    datatable to get only the changed rows. Send this back to the server in a
    dataset. One easy way to do this is to use web services on the server.

    "Pat Alessi" <> wrote in message
    news:...
    > I want to use an XML data island to display editable records to a user
    > on the cleint side. The user should be able to scroll through the
    > records, modify any or all fields in any or all records, add records,
    > and delete records.
    >
    > As far as I can see, there are a couple of ways to implement this. I
    > could persist the original data island and create a duplicate data
    > island that the user would modify. When the modifications were
    > complete, I could post back both XML snippets and compare them to see
    > what has changed.
    >
    > Alternatively, I was thinking about using the DiffGram idea, where
    > each change would add an xml element to an xml snippet that would
    > indicate what item was changed, added, deleted, etc.
    >
    > I know that I am not the first person to want to use this type of
    > technique, so I was hoping that there is something built into the .Net
    > framework to help with the management of the data. Ideally, I would
    > like to do something like serialize a dataset to XML, send it to the
    > client as an XML data island, have them manipulate it, repost it, and
    > then turn it "magically" into a batch update to the dataset on the
    > server side. Is that possible, or do I have to roll my own solution?
    >
    > Thanks.
    >
    > Pat
     
    Rick Spiewak, May 26, 2004
    #2
    1. Advertising

  3. Pat Alessi

    Pat Alessi Guest

    So, I could create a dataset, serialize it and send it down to the
    client. Then, on the client side, I could bind it to some controls,
    let the user add, delete, and modify records. Then, on repost, I
    should convert the data back into a dataset, and call .getchanges? I
    don't see how getchanges would work without having the original
    dataset to compare the new dataset to?

    How could I implement this with web services without posting the
    information back to the server for every change?

    Pat

    "Rick Spiewak" <> wrote in message news:<#>...
    > If you read the XML back into a dataset, then you can use .getchanges on the
    > datatable to get only the changed rows. Send this back to the server in a
    > dataset. One easy way to do this is to use web services on the server.
    >
    > "Pat Alessi" <> wrote in message
    > news:...
    > > I want to use an XML data island to display editable records to a user
    > > on the cleint side. The user should be able to scroll through the
    > > records, modify any or all fields in any or all records, add records,
    > > and delete records.
    > >
    > > As far as I can see, there are a couple of ways to implement this. I
    > > could persist the original data island and create a duplicate data
    > > island that the user would modify. When the modifications were
    > > complete, I could post back both XML snippets and compare them to see
    > > what has changed.
    > >
    > > Alternatively, I was thinking about using the DiffGram idea, where
    > > each change would add an xml element to an xml snippet that would
    > > indicate what item was changed, added, deleted, etc.
    > >
    > > I know that I am not the first person to want to use this type of
    > > technique, so I was hoping that there is something built into the .Net
    > > framework to help with the management of the data. Ideally, I would
    > > like to do something like serialize a dataset to XML, send it to the
    > > client as an XML data island, have them manipulate it, repost it, and
    > > then turn it "magically" into a batch update to the dataset on the
    > > server side. Is that possible, or do I have to roll my own solution?
    > >
    > > Thanks.
    > >
    > > Pat
     
    Pat Alessi, May 26, 2004
    #3
  4. Pat Alessi

    Rick Spiewak Guest

    Don't bind to the XML, re-create the dataset. Then you can do getchanges
    against the modified table, re-create a dataset with just the changes,
    and send that back up to the server.


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Rick Spiewak, May 26, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?TWFyaw==?=

    Access xml data Island from C# code

    =?Utf-8?B?TWFyaw==?=, Apr 27, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    452
    =?Utf-8?B?TWFyaw==?=
    Apr 27, 2004
  2. Mark Goldin

    Web control that acts as a xml data island

    Mark Goldin, Apr 29, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    380
    Ken Cox [Microsoft MVP]
    Apr 29, 2004
  3. =?Utf-8?B?YWRvbGYgZ2FybGlj?=

    How to access client side XML data island from server side?

    =?Utf-8?B?YWRvbGYgZ2FybGlj?=, Nov 23, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    1,165
    aa7im
    Nov 23, 2004
  4. Tim
    Replies:
    5
    Views:
    6,975
    Thomas 'PointedEars' Lahn
    Mar 2, 2004
  5. Joe Bloggs
    Replies:
    2
    Views:
    1,701
    Joe Bloggs
    Apr 9, 2005
Loading...

Share This Page