J
jason
Will this work - dynamic determination of root (local or web host) and
consume this in include file anywhere. I am concerned about dynamic
construction
of virtual absolute include in the consuming file. Take a look and tell me
what you think:
GLOBAL.ASA
Sub application_onstart
Application("rootDir") = Server.MapPath("/")
End sub
VIRTUAL INCLUDE
/includes/dbConn.inc
Set dbConn = Server.CreateObject("ADODB.Connection")
Conn.open "Provider=Microsoft.Jet.OLEDB.4.0; Data source =" &
Application("rootDir") & "/database/db.mdb"
CONSUMER FILE
Index.asp
-------------------
<!--# virtual include=" & Application("rootDir") & "
/includes/dbConn.inc"-->
<html>
<body>
<%
' loop database
%>
</body>
consume this in include file anywhere. I am concerned about dynamic
construction
of virtual absolute include in the consuming file. Take a look and tell me
what you think:
GLOBAL.ASA
Sub application_onstart
Application("rootDir") = Server.MapPath("/")
End sub
VIRTUAL INCLUDE
/includes/dbConn.inc
Set dbConn = Server.CreateObject("ADODB.Connection")
Conn.open "Provider=Microsoft.Jet.OLEDB.4.0; Data source =" &
Application("rootDir") & "/database/db.mdb"
CONSUMER FILE
Index.asp
-------------------
<!--# virtual include=" & Application("rootDir") & "
/includes/dbConn.inc"-->
<html>
<body>
<%
' loop database
%>
</body>