bigracefan
Programmer
I have this application that has been running for over a month with no problems. Here is the code that I use to read the files:
StartChecking:
On Error GoTo ErrorTrap
SearchPath = gFolder & "\" & filename
intFileNum = FreeFile
i = 0
Close #intFileNum
MyFileName = Dir(SearchPath)
Open SearchPath For Input As #intFileNum
Do While Not EOF(intFileNum)
If i = 0 Then
Input #intFileNum, strValue(i, 0), strValue(i, 1), strValue(i, 2), strValue(i, 3), strValue(i, 4), strValue(i, 5), strValue(i, 6)
ElseIf i = 1 Then
Input #intFileNum, intValue(i, 0), strValue(i, 1), strValue(i, 2), strValue(i, 3), strValue(i, 4), strValue(i, 5), strValue(i, 6)
Else
Input #intFileNum, strValue(i, 0), strValue(i, 1), strValue(i, 2), intValue(i, 3), intValue(i, 4), intValue(i, 5), intValue(i, 6)
End If
i = i + 1
Loop
This is the actual data from a text file that is giving me the error.
,"TestName","Index","Status","Measured","LowLimit","HighLimit"
,"KCST Line #2 Aging #28",0,1,"2857","154198",20040119083439
,"F/S NG/70_2,AT1_4,AT7_4,AT16_3,AT23_3","",1,,,
The value of i=2. I've tried commenting the line of code back but I still get the same result. Any ideas?
Thanks.
StartChecking:
On Error GoTo ErrorTrap
SearchPath = gFolder & "\" & filename
intFileNum = FreeFile
i = 0
Close #intFileNum
MyFileName = Dir(SearchPath)
Open SearchPath For Input As #intFileNum
Do While Not EOF(intFileNum)
If i = 0 Then
Input #intFileNum, strValue(i, 0), strValue(i, 1), strValue(i, 2), strValue(i, 3), strValue(i, 4), strValue(i, 5), strValue(i, 6)
ElseIf i = 1 Then
Input #intFileNum, intValue(i, 0), strValue(i, 1), strValue(i, 2), strValue(i, 3), strValue(i, 4), strValue(i, 5), strValue(i, 6)
Else
Input #intFileNum, strValue(i, 0), strValue(i, 1), strValue(i, 2), intValue(i, 3), intValue(i, 4), intValue(i, 5), intValue(i, 6)
End If
i = i + 1
Loop
This is the actual data from a text file that is giving me the error.
,"TestName","Index","Status","Measured","LowLimit","HighLimit"
,"KCST Line #2 Aging #28",0,1,"2857","154198",20040119083439
,"F/S NG/70_2,AT1_4,AT7_4,AT16_3,AT23_3","",1,,,
The value of i=2. I've tried commenting the line of code back but I still get the same result. Any ideas?
Thanks.