<% Const HDW_DATABASE_TYPE = "MSSQL" ' can be: MSACCESS, MSSQL or ODBC Const HDW_DATABASE_PATH = "../../../../../../../../" ' virtual path, only for MSACCESS DATABASES Const HDW_DATABASE_HOST = "localhost" 'database host, if required only for MSSQL DATABASES Const HDW_DATABASE = "" Const HDW_USERNAME = "webdev" 'username to access the database, if any Const HDW_PASSWORD = "tRad8-u?" 'password to access the database, if any Const HDW_PASS = "tRad8-u?" Const HDW_MSACCESS_CONNSTR = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=##path##\##db##;Persist Security Info=False" Const HDW_MSSQL_CONNSTR = "Driver={SQL Server};Server=##host##;Database=##db##;Uid=##user##;Pwd=##pass##;" Response.Expires = 0 Dim HDW_CONNECTION_STRING If HDW_DATABASE_TYPE = "MSACCESS" Then HDW_CONNECTION_STRING = HDW_MSACCESS_CONNSTR ElseIf HDW_DATABASE_TYPE = "MSSQL" Then HDW_CONNECTION_STRING = HDW_MSSQL_CONNSTR Else HDW_CONNECTION_STRING = HDW_DATABASE End If HDW_CONNECTION_STRING = Replace(HDW_CONNECTION_STRING, "##db##", HDW_DATABASE) If (HDW_DATABASE_PATH <> "") Then HDW_CONNECTION_STRING = Replace(HDW_CONNECTION_STRING, "##path##", Server.MapPath(HDW_DATABASE_PATH)) HDW_CONNECTION_STRING = Replace(HDW_CONNECTION_STRING, "##host##", HDW_DATABASE_HOST) HDW_CONNECTION_STRING = Replace(HDW_CONNECTION_STRING, "##user##", HDW_USERNAME) HDW_CONNECTION_STRING = Replace(HDW_CONNECTION_STRING, "##pass##", HDW_PASSWORD) Set DataC = Server.CreateObject ("ADODB.Connection") DataC.Open HDW_CONNECTION_STRING Const HDW_DATABASE_DW = "WebForms" Const HDW_MAIN_FIELD = "HDW_ID" %>