Results 1 to 4 of 4

Thread: Cannot webservices return datatables?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    May 2002
    Posts
    1,602

    Cannot webservices return datatables?

    In a few webmethods I built, I had them return a datatable object... BUT I got the error:

    Cannot serialize member System.ComponentModel.MarshalByValueComponent.Site of type System.ComponentModel.ISite because it is an interface

    So I changed to dataset and it worked like a charm...

    why? The datatable is Serializable so there should be no problem creating a proxy class...

    kind regards
    Henrik

  2. #2
    Fanatic Member venerable bede's Avatar
    Join Date
    Sep 2002
    Location
    The mystic land of Geordies
    Posts
    1,018
    I am pretty sure I read somewhere that tables cannot be returned although I am hoping they are wrong.

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    May 2002
    Posts
    1,602
    I see no reason why?

    Perhaps Im old fashioned, but I always work with the principle, if I don't need disconnected data with many relations, I always use the datatable OR datareader... no point in using a heavy dataset object if you don't use it's functionality....

    /Henrik

  4. #4
    Hyperactive Member
    Join Date
    Aug 2002
    Location
    Fort Collins, CO
    Posts
    366
    No point in using a heavy dataset unless you have to in order to return a datatable as is the case here. I believe the issue has to do not with just being serializable but it has to support XmlSerialization for webservices which a datatable does not(but i think they have made the datatable a little more separated from the dataset in the next release of .net)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width