I am attempting to use the writeLine command to write a record out to two different text files. It works fine the first time I am attempting to write the line. However, the second time I am attempting to write the line, it does not write out to the file. This happens to fail with any field that defined as type "text field" in the DB. Varchar fields print just fine twice.
SQL_Query = SQL_SELECT & " " & SQL_FROM & " " & SQL_WHERE Set RS = MyConn.Execute(SQL_query) Set fs=Server.CreateObject("Scripting.FileSystemObject")Set ctf1 = fs.CreateTextFile(Server.MapPath("file1.txt"), 2)Set ctf2 = fs.CreateTextFile(Server.MapPath("file2.txt"), 2) ctf1.WriteLine(rs.Fields("text_field"))ctf2.WriteLine(rs.Fields("text_field"))
This is an over-simplified example of what I am attempting to do, but it shows what the problem is. I also tried writing to the same file and it fails writing the second time. Anyone know how to resolve this?