<% '*********************************************************************** ' System : ASPBanner Unlimited ' Author : Christopher Williams of CJWSoft www.CJWSoft.com ' ' COPYRIGHT NOTICE ' ' See attached Software License Agreement ' ' (c) Copyright 2000 - 2003 by CJWSoft. All rights reserved '*********************************************************************** '*** Below are the only two settings you need to edit in this file '** BannerConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=F:\webroot\houseview-online.com\database\aspbanner_access2002.mdb" '** BannerConnectionString = "DBQ=F:\webroot\houseviewonline.com\database\aspbanner_access2002.mdb;Driver={Microsoft Access Driver (*.mdb)}" '** BannerDatabaseType = "MSACCESS" BannerConnectionString = "Driver={SQL Server};Server=208.18.48.246;Database=houseviewonline;Uid=houseviewonline;Pwd=supernova04;" BannerDatabaseType = "SQL" '*** Comments about the above settings '*** '*** The example below shows how to use a system DSN instead of a DNS-LESS connection '*** BannerConnectionString = "DSN=aspbanner" '*** '*** The example below shows how to use a DNS-LESS connection with MSACCESS instead of a system DSN '*** BannerConnectionString = "DBQ=C:\Inetpub\wwwroot\aspbanner\_database\aspbanner.mdb;Driver={Microsoft Access Driver (*.mdb)}" '*** NOTE: You can not use something like "http:\\" to specify the data path.. it must be a drive location..if you don't know it ask the system admin '*** '*** The example below shows how to use a DNS-LESS connection with SQL instead of a system DSN '*** BannerConnectionString = "Provider=sqloledb;Data Source=p600laptop;Initial Catalog=aspbanner;User Id=aspbanneruser;Password=temp;" '*** '*** This variable tells the system if you are using SQL or MSACCESS for you database system '*** BannerDatabaseType = "SQL" '*** BannerDatabaseType = "MSACCESS" '*** This needs to be specified as some SQL statements are slightly different between the two database systems '*** This part checks the BannerConnectionString info you entered and reports back errors if it is not ok '*** Done because many people have friendly error messahges enabled in their IE settings and may not see the real error Err.Clear On Error Resume Next Set ConnBannerSystem = Server.CreateObject("ADODB.Connection") Set CmdCheckUser = Server.CreateObject("ADODB.Recordset") ConnBannerSystem.Open BannerConnectionString If Err.Number <> 0 Then Response.Write("") Response.Write (Err.Description) Response.Write("") Response.End If BannerDatabaseType = "" Then Response.Write("") Response.Write ("Error: BannerDatabaseType has not been specified in dataconn_inc.asp file.") Response.Write("") Response.End End If End If '*** This part checks the BannerConnectionString info you entered and reports back errors is it is not ok %>