option explicit and includes????

Results 1 to 2 of 2

Thread: option explicit and includes????

  1. #1
    Join Date
    Dec 1969

    Default option explicit and includes????

    I have a question about Option Explicit. I was using it ok. However when i moved my connection out of this asp file into the include DataStore it would not work because its not defined there. I&#039;ve provided the code with the option explicit commented this way it works. Is this ok or should i have done it another way inorder to use both the include and the option explicit. <BR><BR>&#060;!--#include file="DataStore.asp"--&#062;<BR>&#060;%<BR> &#039;Option Explicit<BR> Dim datToday, msg, SQLstmt, sname<BR> sname = Session("supvname")<BR> <BR> datToday = Date<BR> <BR> SQLstmt = "SELECT * FROM CONSULTANTS where SupvName "<BR> SQLstmt = SQLstmt & " = " <BR> SQLstmt = SQLstmt & "&#039;" & sname & "&#039;"<BR> <BR> <BR> if session("type") = 1 then<BR> rs.OPEN "CONSULTANTS",conn<BR> else<BR> rs.OPEN SQLstmt,conn<BR> end if<BR> <BR>%&#062;

  2. #2
    Join Date
    Dec 1969

    Default RE: option explicit and includes????

    Your include should go under option expicit. this always needs to be first line of code

Posting Permissions

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