trouble with "Include"

Results 1 to 2 of 2

Thread: trouble with "Include"

  1. #1
    Join Date
    Dec 1969

    Default trouble with "Include"

    I have an asp page that diplays and access db calendar. I want to protect the site and I have been using an includes page that has an access db for user names and passwords that gives a session for the user. The problem I have encountered is that when I try to protect the page I get an error message that states:<BR>Name redefined <BR><BR>Const adOpenForwardOnly = 0<BR>------^<BR><BR>The calendar page already has 3 includes files and when I add mine i get the error. Is there a way to protect this page. I have pasted the first few lines of the calendar page below. Thanks for any help.<BR><BR><BR>&#060;%@ LANGUAGE="VBScript" %&#062;<BR><BR>&#060;!-- #Include File="" --&#062;<BR>&#060;%<BR>dbf=Server.MapPath (dbName)<BR>%&#062;<BR>&#060;!-- #Include file="" --&#062;<BR>&#060;!--#include file=""--&#062;<BR>&#060;%<BR><BR>dbf=Server.MapPath (dbName)<BR><BR>set conn= Server.CreateObject("ADODB.Connection")<BR>Conn.Op en "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" + dbf<BR><BR>Function FormatStr(String)<BR> on Error resume next<BR> String = Replace(String, CHR(13), "")<BR> String = Replace(String, CHR(10) & CHR(10), "&#060;/P&#062;&#060;P&#062;")<BR> String = Replace(String, CHR(10), "<BR>")<BR> FormatStr = String<BR>End Function<BR><BR>Dim dtToday <BR>dtToday = Date()<BR><BR>Dim dtCurViewMonth &#039 First day of the currently viewed month<BR>Dim dtCurViewDay &#039 Current day of the currently viewed month<BR>Dim frmDate &#039 Date submitted by form<BR><BR><BR><BR>If InStr(1, Request.Form, "subGO", 1) &#062; 0 then<BR> if Request.Form("CURDATE_month") = "" then<BR> tmpMonth = month(now())<BR> else<BR> tmpMonth = Request.Form("CURDATE_month")<BR> End If<BR> <BR> if Request.Form("CURDATE_year") = "" then<BR> tmpyear = year(now())<BR> else<BR> tmpyear = Request.Form("CURDATE_year")<BR> End If<BR> <BR> tmpDate = "1 " & tmpMonth & " 1999"<BR> <BR> mnth = Month(tmpDate)<BR> frmDate = DateSerial(tmpyear, mnth, 1)<BR>Else<BR><BR> frmDate = Request.Form("CURDATE")<BR> <BR>end if<BR><BR>if Request("view_date") &#060;&#062; "" then <BR> frmDate= DateSerial(year(Request("view_date")), month(Request("view_date")), 1)<BR>end if<BR><BR>

  2. #2
    Eddie Campbell Guest

    Default RE: trouble with

    Check through your include files, you will find that you are defining adOpenForwardOnly in more than one of them. Just remove the line from one place and the problem should go away.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts