Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot serialize interface System.Data.IDataReader 1

Status
Not open for further replies.

ksbigfoot

Programmer
Apr 15, 2002
856
CA
I am trying to create a webservice and pass back to my combobox an IDataReader.
When I try to run the service, I get this in my webpage: "Cannot serialize interface System.Data.IDataReader". Can I use a DataReader or does it have to be XML or something like that?
Could someone point me in the right direction.
Thanks
 
Yes, you will get that error if you try to return any interface as it's XML that is returned from a web service and interfaces don't really have any correlation to XML. You should be able to use of the the base classes though (System.Data.DataTable, System.Data.DataReader etc).


-------------------------------------------------------

Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]
[URL unfurl="true"]http://mdssolutions.co.uk[/url] - Delivering professional ASP.NET solutions
[URL unfurl="true"]http://weblogs.asp.net/marksmith[/url]
 
Thanks ca8msm,
Star to you. I was able to get it working using a DataTable.

ksbigfoot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top