English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I want to pass datatable to a .Net webservice, i dont want to pass dataset, i need to pass only datatable..

2007-03-21 04:54:48 · 2 answers · asked by es_ha_kr 1 in Computers & Internet Programming & Design

2 answers

It would help if you mentioned what platform/language you're developing in, that needs to invoke the .NET web service. If we assume it is also .NET, you just need to create your project in Visual Studio and go to Add Web Reference, enter the URL of the web service, and it will download the WSDL and treat the service as a kind of "virtual assembly" - you can then invoke it as you would any other normal method, passing the datatable directly to the method.

Under .NET 1.1, you need to pass a dataset containing the datatable you want to pass.

2007-03-21 05:43:15 · answer #1 · answered by Rex M 6 · 0 1

You can do that in .NET 2.0 but not .NET 1.1. Under .NET 2.0 a DataTable is serializable.

As for using DataSets and DataTables to pass data between a web service and a client application, you need to to ask yourself why you are using web services to start with. They are designed, after all, for the purpose of interop/integration. If you are using them for that intended purpose then you want the generic XML solution.

You might also find this link very interesting
http://support.microsoft.com/default.aspx?scid=kb;en-us;306134

2007-03-21 07:34:32 · answer #2 · answered by Smutty 6 · 0 1

fedest.com, questions and answers