473,554 Members | 2,185 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 5184
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
1652
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
4573
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
4298
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
2922
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
2011
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
1553
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
17634
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
2087
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
7535
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...
0
8051
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...
1
7574
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
7894
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...
1
5442
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...
0
5162
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3579
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
1145
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
850
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.