<%@ Language=VBScript %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html xmlns=" >
<head>
<title>Call file.asp from the database</title>
</head>
<body>
call_inc_file.asp calls hello.asp <br />
hello.asp contents: <!-- #include file="hello.asp" -->.OK HERE
<%
dim Conn
dim sql
dim ors
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.ConnectionString = "DSN=aaa; UID=bbb; PWD=ccc"
Conn.Open
sql = "select file_name from file_name_tbl"
Set ors = Conn.Execute(sql)
//use this if...else to catch exception
IF NOT ors.EOF THEN
ors.movefirst
do
'response.write(ors.Fields("file_name").value & "<br>")
%>
Expect to print file contents here: #include file="<%=ors.Fields("file_name").value%>" <br /> but it does not. WHAT SHOULD I DO TO EXEC THE INCLUDE FILE FROM HERE? TY FOR HELP
<%
ors.MoveNext
loop until ors.EOF
ors.Close
Set ors = nothing
Conn.close
Set Conn = nothing
END IF
%>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html xmlns=" >
<head>
<title>Call file.asp from the database</title>
</head>
<body>
call_inc_file.asp calls hello.asp <br />
hello.asp contents: <!-- #include file="hello.asp" -->.OK HERE
<%
dim Conn
dim sql
dim ors
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.ConnectionString = "DSN=aaa; UID=bbb; PWD=ccc"
Conn.Open
sql = "select file_name from file_name_tbl"
Set ors = Conn.Execute(sql)
//use this if...else to catch exception
IF NOT ors.EOF THEN
ors.movefirst
do
'response.write(ors.Fields("file_name").value & "<br>")
%>
Expect to print file contents here: #include file="<%=ors.Fields("file_name").value%>" <br /> but it does not. WHAT SHOULD I DO TO EXEC THE INCLUDE FILE FROM HERE? TY FOR HELP
<%
ors.MoveNext
loop until ors.EOF
ors.Close
Set ors = nothing
Conn.close
Set Conn = nothing
END IF
%>
</body>
</html>