C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » Webservices »

How to iterate through records


Posted Date: 03 Nov 2009      Posted By: Swaroop Roy Mahidhara      Member Level: Gold     Points: 1   Responses: 2



Hi I have a webservice, that calls an sp which has a select query using for auto xml.

I am trying to read these records using
dataset.readxml(commandobject.ExecuteXMLReader)

the above code is fetching only one record. (even the sp is returning two records)

How to solve this.

Regards,
Swaroop





Responses

Author: ABitSmart    03 Nov 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

Can you post more code, specifically commandobject related code.

Kind regards,
ABitSmart
DNS Web-master, DNS MVM
My blog
Thoughts.exe



Author: Swaroop Roy Mahidhara    03 Nov 2009Member Level: GoldRating: 2 out of 52 out of 5     Points: 2

commandobject.commandtext = "<stored procedure>"

//the below are the parameters for the stored proc.
commandobject.parameters.add("@param1", varchar).value = val1;
commandobject.parameters.add("@param2", varchar).value = val2;

//Dataset

dataset ds = new dataset();
ds.ReadXML(commandobject.executexmlreader());

int reccount;
reccount = ds.tables[0].rows.count; //this statement is returning only one record.

Hope you got the problem.

Regards,
swaroop



Post Reply
You must Sign In to post a response.
Next : How Can I JPEG Into RTF and Have It Look The Same as The Original?
Previous : What is the use of webservices?how it will work ?give me some sample sites?
Return to Discussion Forum
Post New Message
Category: Webservices

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use