This is making me nuts - as short a hike as that is.
I have a CSV downloaded from a web based Database (I know it to be a PostgreSQL database) that has 32 columns - a combination of text, integers, one Double, a couple of boolean and a 3 dates.
The problem is with the date column. Looking at the original file in Excel the date column is “12/10/77”. In the following code, after the sRecord = tisTextInput.ReadLine, the sRecord variable contains the date column as 1977-12-10. The complete sRecord value is Candidate,506480,Mister,"",Nathan,Louis,Vick,"",Nathan,1977-12-10,Regular,0,8229 FM 1649,"",Gilmer,TX,75645-6571,"","",903.720.0401,1,YES,YES.
The only code that should execute is as follows:
dim tisTextInput As TextInputStream
dim sRecord As String
tisTextInput = TextInputStream.Open(Globals.fiFolderItem)
//tisTextInput.Encoding = Encodings.MacRoman
Catch e As IOException
MsgBox(“Error accessing file.”)
If tisTextInput.EOF Then
MsgBox(“End of File”)
sRecord = tisTextInput.ReadLine //first record contains column headings and isn’t used
**sRecord = tisTextInput.ReadLine** sFields = sRecord.Split(",") ListBox1.AddRow(sFields())
Loop Until tisTextInput.EOF