Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where put SQL in DataAccess Class?
Message
De
27/01/2004 15:50:54
Del Despain
Colorado Plateau Associates
Hurricane, Utah, États-Unis
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Where put SQL in DataAccess Class?
Divers
Thread ID:
00871117
Message ID:
00871117
Vues:
65
For simplicity, MM jump start applications/examples have the business objects send SQL statements to the data access class for execution, such as with calls to GetDataSet(). However, if I have multiple custom data access classes for a business object (one for each backend database supported), where is it recommended that I put code for selecting and generating the appropriate SQL statements?

I assume that each data access class should stand on its own and generate the needed SQL statements. Not only might there be more than one backend, but the query statments may vary depending on various parameters/needs, which means the business object will have to inform the data access class with various parameters, etc. what is needed.

I see a couple of ways to possibly handle this, but I think I might be missing the simple approach. Any direction or suggestions would be appreciated.

Thanks!

Del
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform