Results 1 to 4 of 4

Thread: [CLOSED] Can you perform a select query against the Dataset?

  1. #1

    Thread Starter
    Lively Member Venus's Avatar
    Join Date
    Aug 2005
    Posts
    78

    [CLOSED] Can you perform a select query against the Dataset?

    I have 2 tables in my dataset and want to create a select statement against the two tables with a join, creating yet a third table in my dataset. The key here, I want to do it AGAINST the cached Dataset and NOT the server.

    I want the user to play with the numbers and see the results on the screen and when they're happy THEN they click save and the data goes to the server. I know how to do this in a function that loops record by record I was hoping I could just do a select on the two tables in the dataset and storing the results in a third. Can you do a select & join against a Dataset?

    Thanks
    Last edited by Venus; Jul 30th, 2008 at 04:14 PM.

  2. #2
    Frenzied Member
    Join Date
    Jan 2006
    Posts
    1,875

    Re: Can you perform a select query against the Dataset?

    you should look for DataRelation object
    __________________
    Rate the posts that helped you

  3. #3
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    7,957

    Re: Can you perform a select query against the Dataset?

    A datatable within a dataset has a select method. Could you use that?

    E.g.
    MyDataSet.MyDataTable.Select(field=value)
    Last edited by FunkyDexter; Jul 30th, 2008 at 11:18 AM.
    The best argument against democracy is a five minute conversation with the average voter - Winston Churchill

    Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd

  4. #4

    Thread Starter
    Lively Member Venus's Avatar
    Join Date
    Aug 2005
    Posts
    78

    Re: Can you perform a select query against the Dataset?

    The relation object I don't believe is something I can use I have a many to many relationship (child to child) I want to display in the same datagridview, one of the columns is calculated. It's really easy to do in SQL against server databases but I don't know how I'd do it against a cached Dataset instead with the two individual tables loaded seperately in that dataset I'd like to add a third table that joins them. I've researched it long enough, a Dataset isn't a Database you can filter & use expression columns but far as I can see you can't run a simple select statement against a dataset trying to "join" two seperate tables, you have to create the joined table manually.

    Thanks!
    Last edited by Venus; Jul 30th, 2008 at 04:26 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width