Problem passing a modified string contained within a dataset over a web service

Discussion in 'ASP .Net Web Services' started by eazilyled@yahoo.co.uk, Mar 12, 2007.

  1. Guest

    I have been having a problem when passing a modified string contained
    within a dataset over a web service.

    The dataset is populated on a server using an ADO.NET data adapter /
    SQL Server 2005 database, and then passed over the wire using web
    services to a client win forms app. The dataset contains a table
    called 'Note', which in turn contains a string column called 'Body'.
    The client app can then edit the value of the 'Body' column and send
    the dataset back over to the server using web services for the changes
    to be committed to the database.

    This all works fine, except when the value of the 'Body' column in one
    of the rows starts off as "\r\n" , i.e. just a carriage return, and
    then gets modified to "\r\nt". So the values on the client side before
    being sent to the server are:

    dataset.Tables["Note"].Rows[0]["Body", DataRowVersion.Original] = "\r
    \n"
    dataset.Tables["Note"].Rows[0]["Body", DataRowVersion.Current] = "\r
    \nt"

    ... the values the server gets are

    dataset.Tables["Note"].Rows[0]["Body", DataRowVersion.Original] = ""
    <- an empty string!
    dataset.Tables["Note"].Rows[0]["Body", DataRowVersion.Current] = "\r
    \nt"

    This causes my data adapter on the server side to throw a
    DBConcurrencyException when committing the changes as it thinks the
    data in the database has been modified by someone else (my data
    adpater is using a SqlCommandBuilder with the ConflictOption set to
    CompareAllSearchableValues).

    Has anyone else seen problems similar to this? We are using Visual
    Studio 2005 with SP1.

    Regards,
    Rick
     
    , Mar 12, 2007
    #1
    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. hocho888
    Replies:
    1
    Views:
    657
  2. Adrian

    Typed DataSet serialization over Web Service

    Adrian, Oct 27, 2003, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    145
    Adrian
    Oct 27, 2003
  3. Tony T.

    Calling an Asynch web service within a web service.

    Tony T., Apr 26, 2004, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    195
    Tony T.
    Apr 26, 2004
  4. Mike Dearman
    Replies:
    1
    Views:
    199
    Mike Dearman
    Jun 23, 2004
  5. Justin Crossley

    Problem passing a typed dataset to a web service

    Justin Crossley, Nov 17, 2004, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    149
    Dino Chiesa [Microsoft]
    Nov 18, 2004
Loading...

Share This Page