Information générale
Catégorie:
The Mere Mortals .NET Framework
Thanks Kevin!
Del
>OK...here it is:
>
>MM .NET data access classes give you a variety of choices as to where you place your SQL statements:
>
>1. You can place the SQL statements in the data access class. If you do this, I recommend using a bridge pattern. For example, you could create a method on the business object named "GetOrdersByCustomerID", and create a corresponding method on the data access object named "GetOrdersByCustomerID". The method on the business object passes the call on to the data access object that contains the actual SQL SELECT command. This is the "purer" approach, but requires a little extra work.
>
>2. You can place the SQL statements in the business object. The MM .NET data access classes are smart enough to translate parameters for you. For example, if your SQL select statement contains "@" signs, the MM .NET OLE DB data access class converts these to question marks for you...conversely, if your SQL select statement contains question marks, the MM .NET SQL data access class converts these to "@" signs.
>
>Regards,
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement