473,756 Members | 9,662 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Rank Dataset Contents

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.
May 22 '06 #1
3 2176
Wayne,

Start with asking a question as correct as possible so we can understand
you. A dataset has no rows.

In the datatable you can create an extra column for your problem and than
use the defaultview to show it in the rank you want.

To show you the column and the expression
http://www.vb-tips.com/dbPages.aspx?...3-a3539697edbd

I hope this helps,

Cor

"Wayne Wengert" <wa***********@ wengert.org> schreef in bericht
news:uF******** ********@TK2MSF TNGP03.phx.gbl. ..
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.

May 23 '06 #2
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

"Cor Ligthert [MVP]" <no************ @planet.nl> wrote in message
news:ul******** ******@TK2MSFTN GP05.phx.gbl...
Wayne,

Start with asking a question as correct as possible so we can understand
you. A dataset has no rows.

In the datatable you can create an extra column for your problem and than
use the defaultview to show it in the rank you want.

To show you the column and the expression
http://www.vb-tips.com/dbPages.aspx?...3-a3539697edbd

I hope this helps,

Cor

"Wayne Wengert" <wa***********@ wengert.org> schreef in bericht
news:uF******** ********@TK2MSF TNGP03.phx.gbl. ..
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.


May 23 '06 #3
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

"Wayne Wengert" <wa***********@ wengert.org> schreef in bericht
news:%2******** *******@TK2MSFT NGP03.phx.gbl.. .
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

"Cor Ligthert [MVP]" <no************ @planet.nl> wrote in message
news:ul******** ******@TK2MSFTN GP05.phx.gbl...
Wayne,

Start with asking a question as correct as possible so we can understand
you. A dataset has no rows.

In the datatable you can create an extra column for your problem and than
use the defaultview to show it in the rank you want.

To show you the column and the expression
http://www.vb-tips.com/dbPages.aspx?...3-a3539697edbd

I hope this helps,

Cor

"Wayne Wengert" <wa***********@ wengert.org> schreef in bericht
news:uF******** ********@TK2MSF TNGP03.phx.gbl. ..
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.



May 23 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
2980
by: Can | last post by:
I am creating an on-line survey. I want the user to have a list of choices of say 10 items that are radio buttons. They need to rank their preference. They click on preference 1, that option is removed from the top list (choices) and appears below in a list called 'Your preferences', you keep looping until all of your preferences are made. Does this make sense? How to I set it up with Javascript? Any help is appreciated.
2
1961
by: dam_fool_2003 | last post by:
Just now I asked a question about signed char and unsigned char. I had the replay very fast by jens.torring and Tim prince. I post via google so now goes my thanking replay. (I must be more precise according to jens.torring's replay) As I was reading the slandered draft C99 about the conversion (6.3) I have interpreted the word conversion rank as the range of a variable (as per defined in limits.h). Am I wrong in my understanding? (I...
1
1689
by: PartyFears | last post by:
Dear All, I have the following problem. I have populated a datasset and bound the contents to varous text fields defined in a page. I do this through running Me.Databind in the Form_Load of the page concerned. The dataset will only contain one table and one row within the table. Up to this point everything is OK.
3
5057
by: Mae | last post by:
Dear All, I have a problem here, I'm using C# Webform calling a webservices. The webservices return me a XMLnode, using this XMLnode I want to convert it to dataset so I can bind to the datagrid, by extracting the <CustomerData></CustomerData> block from the xmlnode. Below is the sample of xmlnode return from webservices. <?xml version="1.0" encoding="utf-8"?>
2
8879
by: Bennett Haselton | last post by:
I know how to create a DataAdapter that loads data from a data source into a table in a typed DataSet, and how to set the DataSource and DataMember properties of a DataGrid so that at run time it will load the data from that table in the DataSet. Assuming I've got two tables in the DataSet, how can I set the DataSource property of the DataGrid to be an inner join of the two tables in the DataSet? If I want the DataGrid to get data...
5
10633
by: moondaddy | last post by:
I'm caching a dataset in an asp.net session variable to hold a user's data. one data item I need to store is an image the user uploaded. My problem is that I don't know how to get the image into the dataset because I don't know what datatype to set the dataset column and then set this image to. I saw an example where someone defended a datatable in the global class and defined the column as an object, however, when I define a strongly...
13
5052
by: Steve Edwards | last post by:
Hi, Given a map: typedef map<long, string, greater<long> > mapOfFreq; Is there a quicker way to find the rank (i.e. index) of the elememt that has the long value of x? At the moment I'm iterating through the map and keeping count of when I hit it.
13
2367
by: Maxwell2006 | last post by:
Hi, We are having a debate over using DataSet as return value type for web services. The problem is that we don't know whether Java applications can use DataSet
2
2948
by: orenlevy1 | last post by:
Hi Everyone. I have a problem that I could not figure out what to do with it. I have a couple of tables and views. All have the same unique ID. When a user try to do a search on our web site we want to try to look in multiple tables and views, Rank the results and aggregate the results back (remove any duplicates). Part of the search is a Full Text Index search. I created already the following query that seems to be working ok...
0
9292
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10062
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9901
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9878
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9728
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8733
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7282
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5322
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3392
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.