How to do this? Datagrid, Dataset, sql query

  • Thread starter Thread starter Mat
  • Start date Start date
M

Mat

I have typed dataset in applications, which contains table A(ID,name) ,
B(ID,A1, B1,B2)
Table B has columns A1 as foreign key ,primary key of table A

i want to bind dataset or dataview to datagrid which will be exactly the
same thing like
"select A.name, B.B1, B.B2 from A left join B on A.ID=B.A1"
This query select everything from table A and only values from table B which
match the conditions.

But i don't know how to make such a select using dataview ,dataset or
whatever and bind to datagrid

I don't want to use a select query to querie database because i have all
data in dataset and only this part is making problem.

Thanks you for help
 
Hi Mat,

Have a look at:

SQLdataadapter or OledbDataadapter
and to
SQLcommandbuilder or OledbCommandbuilder

I hope this helps,

Cor
 
Back
Top