By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,236 Members | 1,795 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,236 IT Pros & Developers. It's quick & easy.

WCF not returning data in DataTable, even though that's what I told it to do

P: n/a
Thanks for reading this.

I've successfully implemented a WCF solution. However, even though I
designate the return type to be DataTable in my class on the server (hosted
under IIS), it comes back as the following in the generated proxy class:

Public Function SelectCountryByID(ByVal guiID As String) As
SelectCountryByIDResponseSelectCountryByIDResult

Now, it doesn't do this when the type is a simple String, but this long
weird thing is what I get for DataTable.

Thanks for any thoughts,
Ron
Mar 19 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
What does your operation contract definition look like?
In C#:
[OperationContract]
DataTable GetMembers( )
{
// body here that returns a DataTable
}

Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Ronald S. Cook" wrote:
Thanks for reading this.

I've successfully implemented a WCF solution. However, even though I
designate the return type to be DataTable in my class on the server (hosted
under IIS), it comes back as the following in the generated proxy class:

Public Function SelectCountryByID(ByVal guiID As String) As
SelectCountryByIDResponseSelectCountryByIDResult

Now, it doesn't do this when the type is a simple String, but this long
weird thing is what I get for DataTable.

Thanks for any thoughts,
Ron
Mar 19 '07 #2

P: n/a
Weird.. if I make the type DataSet it returns as such, but not DataTable. I
wonder why it doesn't like DataTables.
"Peter Bromberg [C# MVP]" <pb*******@yahoo.yabbadabbadoo.comwrote in
message news:60**********************************@microsof t.com...
What does your operation contract definition look like?
In C#:
[OperationContract]
DataTable GetMembers( )
{
// body here that returns a DataTable
}

Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Ronald S. Cook" wrote:
>Thanks for reading this.

I've successfully implemented a WCF solution. However, even though I
designate the return type to be DataTable in my class on the server
(hosted
under IIS), it comes back as the following in the generated proxy class:

Public Function SelectCountryByID(ByVal guiID As String) As
SelectCountryByIDResponseSelectCountryByIDResul t

Now, it doesn't do this when the type is a simple String, but this long
weird thing is what I get for DataTable.

Thanks for any thoughts,
Ron

Mar 19 '07 #3

P: n/a
Is your datatable a .NET 2.0 version? Only the 2.0 version is serializable, earlier versions are not. The dataset has been serializable all along.
JT

EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com
Apr 3 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.