I am trying to simply read a .txt file with the ReadLine command which I discovered on this site. It does not seam to be working. It works perfectly on my win98 machine running IIS4. But when I transfer all the files onto the winNT4 server running IIS3, it gets stuck in the loop. I do think that the problem is from the ReadLine, since the Textstream is empty before it enters the loop. I think that it is not reading the txt file like it should.<BR><BR>How do I test if it successfully finds and opens the .txt file?<BR><BR>Here is a part of the code:<BR>'==================================== ======<BR>on Error Resume Next <BR>Set conn = CreateObject("adodb.connection")<BR>conn.open "rapport"<BR><BR>Const ForReading = 1, ForWriting = 2, ForAppending = 8 <BR>set fso = Server.CreateObject("scripting.FileSystemObject")< BR>set f = fso.GetFile("c:Inetpubscripts estmyfile.txt")<BR>set ts = f.OpenAsTextStream(ForReading, -2)<BR>TextStreamTest = ts.ReadLine<BR><BR>'--- here when "TextStreamTest" is printed out, it is EMPTY ---<BR><BR>Do While not ts.AtEndOfStream<BR> TextStreamTest = ts.ReadLine<BR><BR> '--- IT GETS STUCK IN HERE ---<BR> '..........other operations here....<BR>Loop<BR>conn.close<BR>'...<BR> 9==========================================<BR><BR >P.S. the "mytext.txt" file resides in the<BR>---> c:Inetpubscripts est <--- directory<BR><BR>ANY help would be very much appreciated.