I am writing an ASP page and struggling with the WriteLine command. The SELECT statement works fine, but I want to send the output to a file instead of the display screen
<%@ LANGUAGE="VBScript" %>
<!--#include file="../timeconn.inc" -->
<%
Response.Buffer=True
Response.Clear
Dim objFSO, objTStream
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objTStream = objFSO.CreateTextFile("c:\supsvc\Medical\admin\test.txt", True)
SQLStmt = "SELECT * from medtransaction"
objTStream.WriteLine()
objTStream.WriteLine("Need data from SELECT statement to go to file text.txt instead of display screen")
objTStream.WriteLine()
objTStream.Close
Set objTStream = nothing
Set objFSO = nothing
Set RS = Connection.Execute(SQLStmt)
%>
Thanks
JD
<%@ LANGUAGE="VBScript" %>
<!--#include file="../timeconn.inc" -->
<%
Response.Buffer=True
Response.Clear
Dim objFSO, objTStream
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objTStream = objFSO.CreateTextFile("c:\supsvc\Medical\admin\test.txt", True)
SQLStmt = "SELECT * from medtransaction"
objTStream.WriteLine()
objTStream.WriteLine("Need data from SELECT statement to go to file text.txt instead of display screen")
objTStream.WriteLine()
objTStream.Close
Set objTStream = nothing
Set objFSO = nothing
Set RS = Connection.Execute(SQLStmt)
%>
Thanks
JD