I'm trying to load data from an external csv file that needs to be massaged before being inserted into a SQL table. Reading the file is fine, but when I try to loop through the stream and load an array using the SPLIT function I get a "Expected End of Statement" error.
Do While Not txtFile.AtEndOfStream
strText = txtFile.ReadLine
Dim dataArray() As String = Split(strText, ",") -- Here's where it breaks
...
build sql statement to insert using the zero based array
RS.Open strSQL, dbConn, adOpenKeyset
Loop
txtFile.Close
I've looked at the BOL and MSDN, but I'm still getting the error.