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

sort table in webservice

P: n/a
I have a service that calles a SP and I need a column sorted for one
application.. Can I do the sorting via the web service or no? I'm not using
straight SQL for the call, i'm calling a stored procedure
Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
If you're retrieving the results into a DataTable or DataSet, you can use
the DataView object to sort. For example, given a DataTable dt with 2
columns ("ID" and "Column_To_Sort"), the following code could sort it:

DataView dv = new DataView(dt);
dv.Sort = "Column_To_Sort";

Now as you iterate through the rows in the DataView, it will be sorted on
the column "Column_To_Sort".

--
Ben Lucas
Lead Developer
Solien Technology, Inc.
www.solien.com

"IGotYourDotNet" <IG************@discussions.microsoft.com> wrote in message
news:2F**********************************@microsof t.com...
I have a service that calles a SP and I need a column sorted for one
application.. Can I do the sorting via the web service or no? I'm not using straight SQL for the call, i'm calling a stored procedure

Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.