|
-
Jun 29th, 2004, 07:37 AM
#1
Thread Starter
Frenzied Member
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
-
Jun 29th, 2004, 09:30 AM
#2
Fanatic Member
I am pretty sure I read somewhere that tables cannot be returned although I am hoping they are wrong.
-
Jun 30th, 2004, 02:11 AM
#3
Thread Starter
Frenzied Member
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
-
Jul 1st, 2004, 01:41 AM
#4
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|