J
James Goodman
Take the following situation:
tblPerson
PersonID
PersonName
tblNumbers
NumberID
PersonID
Number
I would like to display the PersonName and their associated numbers in a
datagrid. I can do this by creating a query which uses an INNER JOIN. I then
use a data-adapter to fill the dataset table.
This works as expected (the grid shows the name and number), until I attempt
to insert a new record. When I insert a new record, because it is
uncomitted, the dataset table cannot display the results of the join, so the
PersonName value gets shown as null.
Alternatively, I can use a data-adapter and load each table into the dataset
individually. The grid can then be bound to tblNumbers and it works as
expected. However, I would like the grid to show the PersonName.
Any ideas on how I can get round this without comitting the data everytime?
tblPerson
PersonID
PersonName
tblNumbers
NumberID
PersonID
Number
I would like to display the PersonName and their associated numbers in a
datagrid. I can do this by creating a query which uses an INNER JOIN. I then
use a data-adapter to fill the dataset table.
This works as expected (the grid shows the name and number), until I attempt
to insert a new record. When I insert a new record, because it is
uncomitted, the dataset table cannot display the results of the join, so the
PersonName value gets shown as null.
Alternatively, I can use a data-adapter and load each table into the dataset
individually. The grid can then be bound to tblNumbers and it works as
expected. However, I would like the grid to show the PersonName.
Any ideas on how I can get round this without comitting the data everytime?