Problem with DataRelation

  • Thread starter Thread starter Mrozu
  • Start date Start date
M

Mrozu

Hi

I have problem with binding two DataTables. Certainly I don't know how
do that so maybe i write what i wanna do.

I have two datatables in my dataset.

First :
"mag1" with columns:
tw_kod
st_stan_mag1

and second "mag2" with columns

tw_kod
st_stan_mag2

and I want to get one table, with three cols:

tw_kod
st_stan_mag1
st_stan_mag2

and i don't know how

in normal SQL i wrote:
SELECT twary_b_mag1.tw_kod, twary_b_mag1.st_stan_mag1,
twary_b_mag2.st_stan_mag2
FROM twary_b_mag1 INNER JOIN
twary_b_mag2 ON twary_b_mag1.tw_kod =
twary_b_mag2.tw_kod

and it works great

how i can do that in my app in DataSet??

Mrozu
 
yeah

very good samples but i think that i'm too novice in VB.NET and i can't
use it in my problem... can you help me? how i can rebuild this samples
to get what i want?

maybe i'll explain my problem again.

I have two tables. First(mag1) with cols tw_kod | st_stan_mag1
and second table(mag2) with cols tw_kod | st_stan_mag2

In first table is one row with

tw_kod | st_stan_mag1
kod1 | 12

and in second:

tw_kod | st_stan_mag2
kod1 | 14

and i want to see for example in my DataGrid:

tw_kod | st_stan_mag1 | st_stan_mag2
kod1 | 12 | 14

I thing that now it is very clearly explained

sorry for my english, i'm from Poland and you know, still learning:)


Mrozu
 
Back
Top