Using VB6
When I Reading the blank text file, showing error as Input Past end of file
Code.
Dim fso As FileSystemObject
Dim TS As TextStream
Dim TempS As String
Dim Final As String
Set fso = New FileSystemObject
Set TS = fso.OpenTextFile(txtSourceDatabaseFile & "\" & FileName, ForReading)
Final = TS.ReadAll
Do Until TS.AtEndOfStream
TempS = TS.ReadLine
Final = Final & TempS & vbCrLf
Loop
TS.Close
How to check whether the text file is empty or not? If empty no need to read the contents, else it should read contents.
Need VB6 code Help