473,385 Members | 2,269 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Is WeService returns a datatable

Hello, I created a Web Service using .Net 2.0 that has a function that
returns a DataTable. I can test the function from the web page when I access
the .asmx from a browser on localhost and it works. I can also test the
function using VB6 and the xmlhttp activex object. The problem I have now is
when using VS 2005 or VB.Net 2005 Express and creating a web references is
that the proxy created doesn't map the function as returning a DataTable
instead returns some other type of object named xxxxResult where xxxx is the
name of the web service function. I have another function that returns a
DataSet that works perfectly with the web reference although I'd rather use a
DataTable since I won't need all the functionality that a DataSet brings.
Anyone have the same problem and found a solution?
Jan 30 '08 #1
1 955
dip_developer
648 Expert 512MB
Hello, I created a Web Service using .Net 2.0 that has a function that
returns a DataTable. I can test the function from the web page when I access
the .asmx from a browser on localhost and it works. I can also test the
function using VB6 and the xmlhttp activex object. The problem I have now is
when using VS 2005 or VB.Net 2005 Express and creating a web references is
that the proxy created doesn't map the function as returning a DataTable
instead returns some other type of object named xxxxResult where xxxx is the
name of the web service function. I have another function that returns a
DataSet that works perfectly with the web reference although I'd rather use a
DataTable since I won't need all the functionality that a DataSet brings.
Anyone have the same problem and found a solution?
you know that whether its dataset or datatable you want to return from a .NET Web Service, its must be XMLSerializable.
in .net 1.1 a datatable/datarow/dataview was not XMLSerializable.
but in .net 2.0 a datatable is serializable ,so that means you can return them from a web service (though you must fill the tablename property first).You must generate the proxy class using the 2.0 version of the WSDL tool else you will get the odd named returned types that you are seeing.(Since ASP.Net 1.1 didnt support it)
Jan 30 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Antonio Ooi | last post by:
Hi, I get a DataTable based on this simple query: SELECT * FROM Customers Later, I want to know just the table name because I do not want to play with the string within the SELECT statement....
2
by: Vagabond Software | last post by:
I'm at a complete loss on this problem. I'm using a DataColumn Expression with the DataTable Select method to return rows matching a data. Rows are returned on my Windows XP Professional computer...
1
by: Don | last post by:
I am new to Indexing Services, have been researching the MS Site as well as web articles on DevHood, etc. I have set up a seperate catalog ("KnowledgeBase") on Win XP with a number of files. I am...
5
by: mtv | last post by:
Hi all, I have the following code: ================================ Webservice side: public class MyWS: WebService { private myLib.DataObject curDataObject;
4
by: Tedmond | last post by:
Dear all, How to code a Web Service function that returns either a DataTable or DataReader to the clients? Or I should use other alternative? Thanks for any help! Tedmond
5
by: Bllich | last post by:
hello I have a web service method named "gettable" that returns DataTable from my database using table adapter.getData(), but when I call it from my winform client it says that method returns...
1
by: David Lazos | last post by:
Hi, I'm using the HeaderTemplate and the ContentTemplate of the Accordion control and binding it to a DataTable. But it doesn't display any data. If i bind the same datatable to a datalist it...
1
by: =?Utf-8?B?anAybXNmdA==?= | last post by:
How would I copy all data from my DataSet that meets a filtering condition to a new DataTable? Is this what I want? DataTable table = new DataTable(); table =...
0
by: Proogeren | last post by:
I have made a service that sends a datatable with person information to a client. In the forms init event I call the service to retreive all persons from my service and displays them in a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.