Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
eirikr
Starting Member
18 Posts |
Posted - 2009-02-26 : 11:47:41
|
<%@ Language=VBScript %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" ><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 Conndim sqldim orsSet 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.EOFors.CloseSet ors = nothingConn.closeSet Conn = nothingEND IF%></body></html> |
|
|
|
|