Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Virtual (i.e. lookup) fields in datatable, but not save
Message
 
À
25/02/2008 17:37:56
Frank Dolinar
Mi House of Representatives
Michigan, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Network:
Novell 6.x
Database:
MS SQL Server
Divers
Thread ID:
01296252
Message ID:
01298319
Vues:
24
Frank,

>We have a number of situations where we need to do the following...
>1) When we acquire data for a datatable (e.g. employee) from the database, for a grid or some other display / edit object on a form, we may wish to show the actual data (such as an address) associated with the employee rather than the foreign key value into the address table of the database;
>2) Various fields on the employee display form may be updated;
>3) When the content of the form is saved, we want to avoid any attempts to save data that has been retrieved from the associated files and simply save changes to the employee data.
>
>Can someone point us to how we accomplish this within the structure of the MM.Net framework? Should we change the employee business object to include the additional fields or should we create a separate business object to address this situation?

Business object and their associated entity objects can definitely present an unnormalized view of data. You can use either dynamic SQL or stored procedures to retrieve the data (and to generate the entity object) and you can use either dynamic SQL or stored procedures to update only a subset of the columns. If using dynamic SQL, you can set the business object's UpdateSelectStatement property to include only the columns you want updated. If you are using stored procedures, just create a stored procedure and data access object that only update the appropriate columns.

Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform