Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > sort table in webservice

Reply
Thread Tools

sort table in webservice

 
 
=?Utf-8?B?SUdvdFlvdXJEb3ROZXQ=?=
Guest
Posts: n/a
 
      08-12-2004
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
 
Reply With Quote
 
 
 
 
Ben Lucas
Guest
Posts: n/a
 
      08-12-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Javascript Toolbox - Table Sort utility - Sort on column's @intattribute Rick Javascript 0 06-08-2010 11:44 PM
Re: When will Thunderbird support sort in place (in context sort)? Ron Natalie Firefox 0 02-02-2006 04:38 AM
Table/table rows/table data tag question? Rio HTML 4 11-05-2004 08:11 AM
Ado sort error-Ado Sort -Relate, Compute By, or Sort operations cannot be done on column(s) whose key length is unknown or exceeds 10 KB. Navin ASP General 1 09-09-2003 07:16 AM
Could not load type VTFixup Table from assembly Invalid token in v-table fix-up table. David Williams ASP .Net 2 08-12-2003 07:55 AM



Advertisments