473,508 Members | 2,282 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Query dataset/datatable

I have a dataset with an unknown amount of fields. The user can choose a
nuber of numeric fields in that datatable. I am making a chart out of those
fields. I need to know the minimum and maximun values of the highest value
of the selected fields. Is there a way to query that dataset/datatable to
get these values. If so, can you give me an example?

--
Dave
Nov 19 '05 #1
3 5178
I suppose you want to know count of columns in data table:
dataTbl.Columns.Count

Elton

el********@hotmail.com
-----Original Message-----
I have a dataset with an unknown amount of fields. The user can choose anuber of numeric fields in that datatable. I am making a chart out of thosefields. I need to know the minimum and maximun values of the highest valueof the selected fields. Is there a way to query that dataset/datatable toget these values. If so, can you give me an example?

--
Dave
.

Nov 19 '05 #2
No. example....

col1 col2 col3 col4 col5
5 8 9 1 1
6 7 4 20 8
23 33 9 5 9
The user wants to see col1 , col2, and col4 in a one chart. I need to know
the max and min value between those 3 columns. So the minimum value of all 3
columns combined is 1 and the maximum value is 33
--
Dave

"Elton Wang" <an*******@discussions.microsoft.com> wrote in message
news:08****************************@phx.gbl...
I suppose you want to know count of columns in data table:
dataTbl.Columns.Count

Elton

el********@hotmail.com
-----Original Message-----
I have a dataset with an unknown amount of fields. The

user can choose a
nuber of numeric fields in that datatable. I am making a

chart out of those
fields. I need to know the minimum and maximun values of

the highest value
of the selected fields. Is there a way to query that

dataset/datatable to
get these values. If so, can you give me an example?

--
Dave
.

Nov 19 '05 #3
In that case you can use
table.Compute("Max(columnName)","");
and
table.Compute("Min(columnName)","");
find out max value and min value for each column, then
compare them.

Elton

-----Original Message-----
No. example....

col1 col2 col3 col4 col5
5 8 9 1 1
6 7 4 20 8
23 33 9 5 9
The user wants to see col1 , col2, and col4 in a one chart. I need to knowthe max and min value between those 3 columns. So the minimum value of all 3columns combined is 1 and the maximum value is 33
--
Dave

"Elton Wang" <an*******@discussions.microsoft.com> wrote in messagenews:08****************************@phx.gbl...
I suppose you want to know count of columns in data table: dataTbl.Columns.Count

Elton

el********@hotmail.com
>-----Original Message-----
>I have a dataset with an unknown amount of fields. The

user can choose a
>nuber of numeric fields in that datatable. I am making
a chart out of those
>fields. I need to know the minimum and maximun values
of the highest value
>of the selected fields. Is there a way to query that

dataset/datatable to
>get these values. If so, can you give me an example?
>
>--
>
>
>Dave
>
>
>.
>

.

Nov 19 '05 #4

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

Similar topics

1
1645
by: Job Lot | last post by:
I have written 6 Queries in an Access DB, which are executed in a For Each…Next loop to populate DataSet object. A new DataTable object is created in DataSet for each query, as follows Private...
3
4566
by: Bill C. | last post by:
Hi, I've got a simple console app that just reads an XML file into a DataSet then prints out a description of each table in the DataSet, including column names and row values for each column. ...
6
4293
by: goodstart123 | last post by:
For example, the following code works fine without SqlConnection. Any Answer to the question? string connectionString = "server=YourServer; uid=sa; pwd=YourPassword;...
4
2919
by: Jim in Arizona | last post by:
Continuing my lessons out of a book, I ran into a problem when trying for the first time to update a datastore (access database in this case). My Code: Private Sub Page_Load(ByVal sender As...
1
2004
by: cindy | last post by:
Get data into datatable, add to dataset dsSearch " Get data into datatable, add to dataset dsSearch Using In-Memory SQL Engine join the tables and select the filenames from the join, add to...
1
1552
by: Chris Thunell | last post by:
I have a dataset / datatable in memory and i would like to run a query against that to create another in memory datatable or dataview. In this case I have a bunch of data... and i want to run a...
8
2987
by: Jim in Arizona | last post by:
I've been using an example out of a book to be able to edit the rows in a database. I am getting the following error: ========================================================...
2
17628
by: =?Utf-8?B?Q2hyaXM=?= | last post by:
How can I run this query against a table in my Access database? I don't know hwo to use it in C#. In VB I would use .Recordset = "some sql statement". How do I do this in C#? //I get a vlaue...
3
2083
by: Oenone | last post by:
I have a project that creates a SqlDataAdapter and uses its Fill method to fill a DataTable with data from a user-provided query. From there I can obviously access details about the rows and...
0
7229
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7398
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...
1
7061
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...
0
7502
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...
0
5637
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,...
0
4716
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3208
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
769
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
428
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.