473,587 Members | 2,229 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 5190
I suppose you want to know count of columns in data table:
dataTbl.Columns .Count

Elton

el********@hotm ail.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*******@disc ussions.microso ft.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********@hotm ail.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*******@disc ussions.microso ft.com> wrote in messagenews:08******* *************** ******@phx.gbl. ..
I suppose you want to know count of columns in data table: dataTbl.Columns .Count

Elton

el********@hotm ail.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
1654
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 Sub GetRawLiRatios() Dim cnn As OleDbConnection Dim cmd As New OleDbCommand Dim dad As OleDbDataAdapter Dim dstRawFigures As New DataSet
3
4580
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. I'm getting some strange results depending the input XML file I use. I was wondering if somebody could help me understand what is going on or point...
6
4300
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; database=ProgASPDotNetBugs"; // get records from the Bugs table string commandString = "Select BugID, Description from Bugs";
4
2925
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 Object, ByVal e As System.EventArgs) Handles Me.Load Dim strConnection, strSQL As String Dim objDataSet As New DataSet() Dim objConnection As...
1
2014
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 dataset dsSearch CODE ON http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=3994&lngWId=10 using SQL connection get data from view...
1
1555
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 'grouping' select query where i just get all items grouped together for example: Existing in memory datatable (2 fields, qty and desc): Record 1:...
8
2997
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: ======================================================== ======================================================== Server Error in '/' Application....
2
17638
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 form a cell and apply it to the SQL statement commandCol = scriptDataGridView.FormattedValue.ToString(); string sCommand = "SELECT CommandString FROM...
3
2089
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 columns returned by the query. However, I need to be able to determine the size of the varchar fields that are returned by the query. The obvious...
0
7915
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8205
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. ...
1
7967
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...
0
8220
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...
0
6619
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...
0
3840
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2347
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1452
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1185
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.