You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- <%
- ' This class encapsulates database access into one location, isolating database details from the rest of the app.
- ' Multiple databases can be handled in one of two ways:
- '
- ' Option 1. Use a single DAL_Class instance with separate public properties for each database.
- ' Ex: To access Orders use DAL.Orders and to access Employees use DAL.Employees.
- '
- ' Option 2. Use a separate DAL_Class instance for each database.
- ' Ex:
- ' dim OrdersDAL : set OrdersDAL = new DAL_Class
- ' OrdersDAL.ConnectionString = "..." <-- you would have to create this property to use this approach
- '
- ' If you only access one database it is easier to just set the global DAL singleton to an instance of the
- ' Database_Class and use it directly. See the example project for details.
-
- '=======================================================================================================================
- ' DATA ACCESS LAYER Class
- '=======================================================================================================================
- dim DAL__Singleton : set DAL__Singleton = Nothing
-
- Function DAL()
- If DAL__Singleton is Nothing then
- set DAL__Singleton = new Database_Class
- DAL__Singleton.Initialize "Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Engine Type=5;Data Source=" & Request.ServerVariables("APPL_PHYSICAL_PATH") & "Data\webdata.mdb;"
-
- End If
- set DAL = DAL__Singleton
- End Function
- %>
|