<% '************************************************************************************************** '** DATABASE SETTINGS '** Enter the required information to your Database here. '** Please double check for accurracy. '************************************************************************************************** '** SETTING ERROR TRAP On Error Resume Next '** DIM DATABASE VARIABLES Dim ConnectString Dim conn Dim AccessDatabasePath Dim AccessDatabaseName Dim sqlDatabaseName Dim sqlServerName Dim sqlPassword Dim sqlUserID Dim DataBaseType Dim tbl_prefix Dim sp_prefix '**************************************************** '** UNCOMMENT THE TYPE OF DATABASE YOU WISH TO USE '**************************************************** DataBaseType = "access" 'DataBaseType = "mssql" 'uncomment this line if you wish to use MS SQL 2000 Database 'DataBaseType = "mysql" 'uncomment this line if you wish to use MYSQL Database '*********************************************************************************** '** ENTER FULL PATH TO DATABASE WITH NO TRAILING SLASH (EXAMPLE: AccessDatabasePath = "C:\websites\yoursite\db" ) '** IF YOU NEED TO USE THE SERVER.MAPPATH EXAMPLE: AccessDatabasePath = Server.MapPath("\mailerpro204") '** CHANGE THE "\mailerpro20" TO THE FOLDER THE DATABASE IS IN AND MAKE SURE YOU HAVE THE BACK SLASH \ '** AND NO TRAILING SLASH. AND DON'T USE THE BEGINING AND ENDING " " EXCEPT THE ONES BETWEEN THE BRACKETS. '*********************************************************************************** AccessDatabasePath = "D:\inetpub\saintphilomena\fpdb" 'enter between the "" the full path to the database. NO trailing slash. If using Server.MapPath delete the "". AccessDatabaseName = "paulinemariefilumenae.mdb" 'enter between the "" the name of Database here, if you have renamed it enter that name. '********************************************************************************** '** MS SQL 2000 AND MYSQL SETTINGS ENTER THE DATABASE NAME, USERID, PASSWORD AND SERVERNAME '********************************************************************************** sqlServerName = "shopphilomena.com" 'enter between the "" the MSSQL Server Name, could be either a IP or Domain Name sqlDatabaseName = "shopphilomena" 'enter between the "" the Database Name. sqlPassword = "richard" 'enter between the "" the Password for Database. sqlUserID = "david" 'enter between the "" the User ID for Database. '************************************************************************************ '**Please check that all above entries are accurate, if not sure please check '**with your Administrator or Web Host Support. If not accurate errors will occur. '************************************************************************************ '************************************** '** CONFIGURATIONS '** DO NOT CHANGE ANYTHING BELOW HERE '************************************** tbl_prefix = "mpro_" sp_prefix = "mpsp_" If DataBaseType = "access" Then ConnectString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & AccessDatabasePath & "\" & AccessDatabaseName Set conn = Server.CreateObject("ADODB.Connection") conn.open ConnectString If err <> 0 Then Response.Write"" err.clear Response.End End If Elseif DataBaseType = "mssql" Then ConnectString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=" & sqlUserID & ";Initial Catalog=" & sqlDatabaseName & ";Data Source=" & sqlServerName & "; Password=" & sqlPassword & ";" Set conn = Server.CreateObject("ADODB.Connection") conn.open ConnectString If err <> 0 Then Response.Write"" err.clear Response.End End If Elseif DataBaseType = "mysql" Then ConnectString = "driver={MySQL ODBC 3.51 Driver};option=4;server=" & sqlServerName & ";user=" & sqlUserID & ";password=" & sqlPassword & ";DATABASE=" & sqlDatabaseName & ";" '##MySQL w/ MyODBC v3.51 Set conn = Server.CreateObject("ADODB.Connection") conn.open ConnectString End If %>