E
Earl
I have to believe this is a fairly common scenario. I have several form
classes where I provide a grid to display historical information. My
database tables are normalized so calling for, say, the supplier table gives
me some foreign keys instead of the actual text that I would like to display
in the grid. Now I can (and have) easily done this with joins or subqueries,
but I'm not satisfied, mainly because this either screws up my
update/insert/delete logic or forces me to make a second trip to the server
*just* for the datagrid display. What's the BEST way to associate the text
from the lookup table with its foreign key in the main table?
In the following example, I'm pulling an ID for the state name but wish to
display the NAME in the datagrid without doing a join:
Supplier table
SupplierID SupplierName SupplierCityStateZipID
.....
CityStateZip table
CityStateZipID CityName StateName Zip
....
Datagrid columns to be displayed
Supplier name Address City State Zip
....
classes where I provide a grid to display historical information. My
database tables are normalized so calling for, say, the supplier table gives
me some foreign keys instead of the actual text that I would like to display
in the grid. Now I can (and have) easily done this with joins or subqueries,
but I'm not satisfied, mainly because this either screws up my
update/insert/delete logic or forces me to make a second trip to the server
*just* for the datagrid display. What's the BEST way to associate the text
from the lookup table with its foreign key in the main table?
In the following example, I'm pulling an ID for the state name but wish to
display the NAME in the datagrid without doing a join:
Supplier table
SupplierID SupplierName SupplierCityStateZipID
.....
CityStateZip table
CityStateZipID CityName StateName Zip
....
Datagrid columns to be displayed
Supplier name Address City State Zip
....