Query dataset/datatable

Discussion in 'ASP .Net' started by DaveF, Dec 15, 2004.

  1. DaveF

    DaveF Guest

    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
     
    DaveF, Dec 15, 2004
    #1
    1. Advertising

  2. DaveF

    Elton Wang Guest

    I suppose you want to know count of columns in data table:
    dataTbl.Columns.Count

    Elton


    >-----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
    >
    >
    >.
    >
     
    Elton Wang, Dec 15, 2004
    #2
    1. Advertising

  3. DaveF

    DaveF Guest

    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" <> wrote in message
    news:089601c4e2ae$8f361690$...
    > I suppose you want to know count of columns in data table:
    > dataTbl.Columns.Count
    >
    > Elton
    >
    >
    > >-----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
    > >
    > >
    > >.
    > >
     
    DaveF, Dec 15, 2004
    #3
  4. DaveF

    Elton Wang Guest

    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 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" <> wrote

    in message
    >news:089601c4e2ae$8f361690$...
    >> I suppose you want to know count of columns in data

    table:
    >> dataTbl.Columns.Count
    >>
    >> Elton
    >>
    >>
    >> >-----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
    >> >
    >> >
    >> >.
    >> >

    >
    >
    >.
    >
     
    Elton Wang, Dec 15, 2004
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nedu N
    Replies:
    1
    Views:
    1,838
    Chris Taylor
    Oct 31, 2003
  2. Nedu N
    Replies:
    2
    Views:
    2,207
  3. =?Utf-8?B?Y2luZHk=?=

    error on query of derived datatable in dataset

    =?Utf-8?B?Y2luZHk=?=, Oct 31, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    2,063
    Steven Cheng[MSFT]
    Nov 1, 2005
  4. Nedu N
    Replies:
    2
    Views:
    242
    Jacob Yang [MSFT]
    Oct 31, 2003
  5. cindy

    error on query of derived datatable in dataset

    cindy, Oct 31, 2005, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    184
    Phillip Williams
    Oct 31, 2005
Loading...

Share This Page