With .NET 1.1, it was not possible to return a DataTable from a web service - only a DataSet.
Finally, I have successfully returned a DataTable from a web service (using .NET 2.0) but I had to do the following before I succeeded:
1. I had to set the "TableName" property of the DataTable before returning it.
2. The proxy class (generated in VS) specifies the return type as
[Procedure Name]Response[Procedure Name]Result
For example, if the procedure in the web service is called "GetDT", the return type in the proxy class is "GetDTResponseGetDTResult".
I had to change each instance of this in the proxy class to "System.Data.DataTable". However, when I update the web reference, it just changes back which causes unnecessary work each time I update it.
Can anyone explain this behaviour and how it can be fixed?
Finally, I have successfully returned a DataTable from a web service (using .NET 2.0) but I had to do the following before I succeeded:
1. I had to set the "TableName" property of the DataTable before returning it.
2. The proxy class (generated in VS) specifies the return type as
[Procedure Name]Response[Procedure Name]Result
For example, if the procedure in the web service is called "GetDT", the return type in the proxy class is "GetDTResponseGetDTResult".
I had to change each instance of this in the proxy class to "System.Data.DataTable". However, when I update the web reference, it just changes back which causes unnecessary work each time I update it.
Can anyone explain this behaviour and how it can be fixed?