Question
combining data from 2 database tables to convert numberID to text? ASP/VB
Hi.
I have the following two database tables:
Orders Table
orderID
customerID
collectionregion (numerical)
deliveryregion (numerical)
Regions Table
regionID
regionname
On my ASP page I have a recordset (rsOrders) which displays the order
details.
When this is displayed, the collectionregion and deliveryregion fields
display as a numerical value, as they should.
This numerical value ties in with the regionID field from the regions table,
to indicate what region the collection/delivery is in.
I would like to be able to display the region name as opposed to the number.
I created a third recordset on the page, which goes like this:
SELECT * from tblRegions WHERE regionID = regionvar
regionvar 1 rsOrders.Fields.Item("deliveryregion")
Now, this works great when I DON'T have the rsOrders information in a Repeat
Region, but when I add the repeat region, it simply displays the region name
for the first record for every record. Why would it not work in the repeat
region?
What can I do to resolve this?
Any help offered would be greatly appreciated. Thanks.
Regards
Nath.
I have the following two database tables:
Orders Table
orderID
customerID
collectionregion (numerical)
deliveryregion (numerical)
Regions Table
regionID
regionname
On my ASP page I have a recordset (rsOrders) which displays the order
details.
When this is displayed, the collectionregion and deliveryregion fields
display as a numerical value, as they should.
This numerical value ties in with the regionID field from the regions table,
to indicate what region the collection/delivery is in.
I would like to be able to display the region name as opposed to the number.
I created a third recordset on the page, which goes like this:
SELECT * from tblRegions WHERE regionID = regionvar
regionvar 1 rsOrders.Fields.Item("deliveryregion")
Now, this works great when I DON'T have the rsOrders information in a Repeat
Region, but when I add the repeat region, it simply displays the region name
for the first record for every record. Why would it not work in the repeat
region?
What can I do to resolve this?
Any help offered would be greatly appreciated. Thanks.
Regards
Nath.
