Data Access Layer

The data access layer dlls are rarely called from developer code. The developers main interaction with these dlls is to add a reference to one or more of them in a project and to specify which one to use in a .config file. Data Access Layer dlls are normally called by Business Objects.


Example

Adding a reference to the SQL Server Data Access Layer dll in your project

<?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings file="developer.config"> <!-- Configure the Data Access Layer - Which database back end to use --> <add key="DataServices" value="SqlDataService"/> <!-- Do not allow dynamic SQL to be executed --> <add key="AllowedDataMethod" value="StoredProcedures"/> <!-- Tell Milos where to find the data --> <add key="database:Server" value="(local)"/> <add key="database:Catalog" value="Northwind"/> <add key="database:StoredProcedurePrefix" value="milos_"/> <!-- In a live application, these settings would not be stored here! --> <add key="database:UserName" value="TestUser"/> <add key="database:Password" value="TestPwd"/> </appSettings> </configuration>

Configuation settings tell the application which Data Access Layer components to use


Last Updated: 7/15/2006