Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best practice on Foreign Keys
Message
De
18/02/2009 15:45:46
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Best practice on Foreign Keys
Versions des environnements
Environment:
ASP.NET
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01382748
Message ID:
01382748
Vues:
110
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform