<% '*********************************************************************** ' System : ASPBanner ' Author : Christopher Williams of CJWSoft www.CJWSoft.com ' ' COPYRIGHT NOTICE ' ' See attached Software License Agreement ' ' (c) Copyright 2000 - 2001 by CJWSoft. All rights reserved '*********************************************************************** '*** Below are the only two settings you need to edit in this file 'BannerConnectionString = "DBQ=C:\Inetpub\wwwroot\aspbanner_standard\_database\aspbanner.mdb;Driver={Microsoft Access Driver (*.mdb)}" BannerConnectionString = Application("ASP-Banner_ConnectionString") BannerDatabaseType = "MSACCESS" '*** 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 Err.Clear On Error Resume Next Set ConnPasswords = Server.CreateObject("ADODB.Connection") Set CmdCheckUser = Server.CreateObject("ADODB.Recordset") ConnPasswords.Open BannerConnectionString If Err.Number <> 0 Then Response.Write("") Response.Write (Err.Description& "




") Response.Write("
") Response.Write("

This means there is most likely a problem with the" & vbCrLf) Response.Write("""BannerConnectionString"" info that you specified.
" & vbCrLf) Response.Write("
" & vbCrLf) Response.Write("If you are using a DSN-Less Connection with MSACCESS.

" & vbCrLf) Response.Write("

Check that the physical path to the database has been" & vbCrLf) Response.Write("specified correctly.
" & vbCrLf) Response.Write("It has to be perfect and correct. It cannot be specified using" & vbCrLf) Response.Write("""http://"" or by using ""server.mappath"".
" & vbCrLf) Response.Write("It has to be specified like the following example.

" & vbCrLf) Response.Write("

BannerConnectionString = ""DBQ=C:\Inetpub\wwwroot\myweb\aspbanner\_database\aspbanner.mdb;Driver={Microsoft Access Driver" & vbCrLf) Response.Write("(*.mdb)};UID=admin;PASSWORD=temp""
" & vbCrLf) Response.Write("

" & vbCrLf) Response.Write("If this is running on an NT server or Win2000 Server make sure that permissions" & vbCrLf) Response.Write("have been set on the database.
" & vbCrLf) Response.Write("Only the server admins can do this. If you are not the admin you will have to" & vbCrLf) Response.Write("ask for this to be done.

" & vbCrLf) Response.Write("


" & vbCrLf) Response.Write("
" & vbCrLf) Response.Write("If you are using a System DSN
" & vbCrLf) Response.Write("
" & vbCrLf) Response.Write("It is not set up correctly. Again, make sure the permissions have been set for the" & vbCrLf) Response.Write("database and that the system DSN has been set up correctly by the server admins.

" & vbCrLf) Response.End End If '*** This part checks the BannerConnectionString info you entered and reports back errors is it is not ok %>