Hey guys,
Having some problem in processing plan ascii files in access generated by a unix system. The problem is that (ref: code below) when I try to parse one line at a time, it recognizes the whole file as 1 line.
I remeber that there is diference between how two systems format the endline statement, one with CarriageReturn-LineFeed and the other with only one of them. I tryed substituting these characters with a Replace() statement, but without any luck.
Any help would great
thanks
Having some problem in processing plan ascii files in access generated by a unix system. The problem is that (ref: code below) when I try to parse one line at a time, it recognizes the whole file as 1 line.
I remeber that there is diference between how two systems format the endline statement, one with CarriageReturn-LineFeed and the other with only one of them. I tryed substituting these characters with a Replace() statement, but without any luck.
Any help would great
Code:
Sub ProcessReportFiles()
Dim inFile As Integer
Dim outFile As Integer
Dim txtLineIn As String
Dim txtLineOut As String
inFile = FreeFile
Open "C:\test.txt" For Input As inFile
outFile = FreeFile
Open "C:\result.txt" For Output As outFile
While Not EOF(inFile)
' Read line into variable.
Line Input #inFile, txtLineIn
'do something with the line
txtLineOut = DoReplacements(txtLineIn)
' put line into an output file
Print #outFile, txtLineOut
Wend
'tidy up
Close #inFile
Close #outFile
End Sub
thanks