Below is a script I use to read text from a file.
The problem is that it doesn't seem to work - when it comes to the "opentxtfile" part it just loads and loads and eventually times out. I'm running IIS on win2000.
Any ideas?
dim strFilePath
dim strFile
dim objFile
dim strFileTxt
strFilePath = "dir/" & rs("MyTxt"
strFile = server.mappath(strFilePath)
Set objFile = Server.Createobject("Scripting.FileSystemObject"
If objFile.fileexists(strFile) Then
Set strFileTxt = objFile.opentextfile(strFile)
While not strFileTxt.atendofstream
strFileTxt.readline
Wend
strFileTxt.close
End if
The problem is that it doesn't seem to work - when it comes to the "opentxtfile" part it just loads and loads and eventually times out. I'm running IIS on win2000.
Any ideas?
dim strFilePath
dim strFile
dim objFile
dim strFileTxt
strFilePath = "dir/" & rs("MyTxt"
strFile = server.mappath(strFilePath)
Set objFile = Server.Createobject("Scripting.FileSystemObject"
If objFile.fileexists(strFile) Then
Set strFileTxt = objFile.opentextfile(strFile)
While not strFileTxt.atendofstream
strFileTxt.readline
Wend
strFileTxt.close
End if