Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best practice on Foreign Keys
Message
From
18/02/2009 15:45:46
 
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Best practice on Foreign Keys
Environment versions
Environment:
ASP.NET
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01382748
Message ID:
01382748
Views:
111
When retrieving a record with a foreign key field it is desirable to display a field from the Primary Key table.

What is the best practice for doing this using the MM.Net framework?

I modified the MM.Net generated stored procedure and Data Access Layer to retrieve the desired field. Is this the acceptable method?

Example:

Crew table:
CrewPK
Name
CrewTypeFK
.
.
.

CrewType table:
CrewTypePK
TypeName
.
.
.

When I display the Crew table information I want to show the CrewType.TypeName instead of the Crew.CrewTypeFK value.
Next
Reply
Map
View

Click here to load this message in the networking platform