Rank Dataset Contents

W

Wayne Wengert

I have a VS2005/VB Windows application in which I want to rank the contents
of a "total" field in a dataset but I can't seem to figure out how to do
this. I've created an SQL DataAdapter and an SQL Dataset and I filled the
dataset with the values needed. The dataset has "n" rows and the columns
include "total" (a decimal value) and "rank" (an integer initially set to
zero). I want to place the ranking value (e.g. 1 through n) for each value
of "total" in the corresponding "rank" column and then write the updated
data back to the DB.
Any suggestions/pointers would be appreciated.
 
W

Wayne Wengert

Cor;

I really do appreciate the response but I have to comment that I get really
tired of worrying about the latest jargon. You say tha a dataset has no
rows - I'm sure that is true in the current jargon but in reality, the
concept of a "row" is there and, in fact, when you want to manipulate the
data you create a "DataRow". How can there be a DataRow if there are no
rows?

The problem I am having is in dealing with the exact syntax required to
perform the ranking across the "rows" of the dataset.

Wayne
 
C

Cor Ligthert [MVP]

Wayne

In the way you describe it, it means ranking all rows in all datatables
which are in the dataset. Is that what you want, than you should probably
first put all the rows in your own class or any other standard class.

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top