DataSet - Query problem
-
i would like to know how that i can do something like this: this is my query: select a.col2, a.col3, b.col2 from tableA a INNER JOIN tableB On a.col1 = b.col1 now if i use a fill from a data adapter i get a dataset with one table with my results. what i want is a dataset: with 2 tables one with the nfo from table a, and one with the info from table b how can i do this? or isn't this possible?
-
i would like to know how that i can do something like this: this is my query: select a.col2, a.col3, b.col2 from tableA a INNER JOIN tableB On a.col1 = b.col1 now if i use a fill from a data adapter i get a dataset with one table with my results. what i want is a dataset: with 2 tables one with the nfo from table a, and one with the info from table b how can i do this? or isn't this possible?
Yes, query tablea, and fill a 'tableA' in a dataset, and then query tableb, and fill a 'tableB' in the dataset, you can have a preset dataset with the relationship or generate it in code. daniero
-
Yes, query tablea, and fill a 'tableA' in a dataset, and then query tableb, and fill a 'tableB' in the dataset, you can have a preset dataset with the relationship or generate it in code. daniero
how do you mean a preset dataset with relationship? the thing i want to avoid is: query table a and fill it in the dataset, than query table b and fill the same dataset, and then put the relationships on it. I want to do this with one query to the db, is this possible? to execute your query, so your adapter will fill your dataset with different tables and relationships.
-
how do you mean a preset dataset with relationship? the thing i want to avoid is: query table a and fill it in the dataset, than query table b and fill the same dataset, and then put the relationships on it. I want to do this with one query to the db, is this possible? to execute your query, so your adapter will fill your dataset with different tables and relationships.
Unless someone else has a better Idea, that's the way I would do it. By preset I mean an xsd file representing a dataset (I think it's called typed dataset). I don't think you can have 2 tables out of one query, unless you make the query as you did, and manually adding the rows in the datatables... but that's even worse :P. daniero -- modified at 18:21 Tuesday 15th November, 2005