include file levels??
am 06.09.2007 20:27:51 von RichI have 3 asp pages that look sort of like this:
default.asp:
<%@ Language=VBScript %>
....
....
login.asp:
<%
dim SQL, rs
SQL = "select * from [user] where..."
rs = GetData(SQL) 'this function is in ExecuteSQL.asp
....
%>
....
ExecuteSQL.asp:
<%
Public Function GetData(SQL)
set objRec = server.CreateObject("adodb.recordset")
objRec.Open SQL,objCon
End Function
%>
The problem is that if I include "ExecuteSQL.asp" directly into the
Login.asp page that invokes the function it works fine. When I move
the include ExecuteSQL.asp to the parent file - Default.asp - it
returns a type mismatch (which I have deduced really means it doesn't
know what the heck GetData is).
I can move the include statement into Login.asp, but I have more
includes of other ASP files in default.asp and it won't let me include
ExecuteSQL.asp in each of them.
Is there an easy way around this?