Re: Master/Detail dataset fill by Alejandro
Alejandro
Thu Mar 04 12:19:15 CST 2004
Thanks for the response, but I have a new question.
If I select only 2 Players in the 1st set:
Select PlayerID, PlayerName from Player where PlayerID in(3,8)
how can I set the 2nd set without passing this 2 parameters?
> -- 1st set
> Select PlayerID, PlayerName from Player
>
> -- 2nd Set
> Select Frags.FragNum, Frags.ServerName
> From Frags INNER JOIN Player ON Frags.PlayerID = Player.PlayerID
>
> So the first table has the players while the second table has their frag
> scores on various servers.
>
>
> Q2:
> Depends on how your table has been set up. ALthough I doubt it'l be up
> to the application to set the ID's. If not, you can return the new ID's
> via the DataAdpater's Insert command by setting up the appropriate
> parameter objects and directions (Input/Output). Linking this parameter
> object to a column would/should simply place the returned ID into said
> column.
>
> Alejandro Bibiano González wrote:
>
> > I hava a typed dataset with 2 tables and a relation (master/detail).
> >
> > I have an dataadapter to fill the master table (with a select and a
> > parameter) and now I want fill the second table with another
dataadapter,
> > but I don't know how I have to define the select sentence to populate it
> > only with the records that have relation with the master table.
> >
> > How can I do this?
> >
> > After filling the dataset, I insert a new row in the master table (it
has an
> > autonumeric Key field simulate with sequences in Oracle), and then I
insert
> > new rows in the detail table. How can I controll the update to insert
the
> > autonumeric key genereted in the master table in the detail table?
> >
> > A lot of thanks,
> >
> > Alex B.
> >
> >
>
> --
> I AM MORTOS!!!! (Switch spammer with blueyonder)