Ask a Question related to ASP.NET Web Services, Design and Development.
-
Tim Medcalf #1
Is it possible to return just a DataTable from a WebMethod, instead of DataSet?
Hi all,
I just want to make sure i'm not doing anything stupid, but it seems to me
that its not possible to return a simple datatable from a WebMethod - it has
to be a full dataset.
The online help seems to state that it is possible with either dataset or
datatable (both remotable, both serializable), but only dataset works for
me.
If i try it with a datatable, when querying the asmx file, i get a message
saying the object cannot be serialized becuase it is an interface. It works
fine when the same datatable is added to a dataset.
Is this correct or am i doing something silly?
Additionally, if this is correct behaviour, could anyone tell my why it is?
Both objects descend from MarshalByValue, and both have the same Interfaces
according to the docs. Any ideas?
Thanks in advance
Tim
Tim Medcalf Guest
-
Can Application_BeginRequest return a DataSet and stop normal webmethod flow?
Hi, I am implementing a couple of webservices (all in the same web project) that will access several backoffice systems to get and update... -
Ccopying a datatable content from an untyped dataset into a table which is inside a typed dataset
Hi All, I am facing problem in copying content of table from a untyped dataset into to a table inside the typed dataset. I wanted to copy the data... -
DataTable as parm to a WebMethod function?
According to MS, DataTable cannot be passed or returned by a Web Service. Try using DataSet instead. Aleksey -
Pulling DataSet From WebMethod -- Possible?
Is it possible to have a public WebMethod in a WebService that returns a DataSet? -- _____________________________ Ron Rodenberg Lead Software... -
DataTable parameter of a WebMethod?
DataTable is not serializable, you have to put them in a dataset. DataTable object to it. I visit the .asmx can't pass in a... -
MSFT #2
RE: Is it possible to return just a DataTable from a WebMethod, instead of DataSet?
Hi Tim,
A datatable can't be be serialized and cannot be returned from an XML Web
service. and there has been a document for this issue:
[url]http://support.microsoft.com/?kbid=306134[/url]
Hope this help,
Luke
Microsoft Online Support
Get Secure! [url]www.microsoft.com/security[/url]
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
MSFT Guest



Reply With Quote

