G
Guest
Hi
My text file varies in size on each occasion it is processed (i.e different
number of lines)
Contents are coma separated, giving data for each column in my sql table
(number of columns is constant)
My problem is not knowing how many lines are in my file.
I want to use this
"fileopen(1, filename, openmode.binary)"
myrecord = lineinput(1)
dim x = split(myrecord, ",")
Then, while looping through each line of the file, use the x array values to
populate sql parameter for use in a parameterized insert command. Open my sql
connection, execute my insert command, close the connection and move onto the
next line. Works perfect on another file I have ..... but that file has a
header line when received which tells me how many records are in the file
so, how will I know the end point of the loop if I don't know the number of
lines in the file
or is there another way of acheiving the same thing with the text file
format I have
Regards
Michael Bond
My text file varies in size on each occasion it is processed (i.e different
number of lines)
Contents are coma separated, giving data for each column in my sql table
(number of columns is constant)
My problem is not knowing how many lines are in my file.
I want to use this
"fileopen(1, filename, openmode.binary)"
myrecord = lineinput(1)
dim x = split(myrecord, ",")
Then, while looping through each line of the file, use the x array values to
populate sql parameter for use in a parameterized insert command. Open my sql
connection, execute my insert command, close the connection and move onto the
next line. Works perfect on another file I have ..... but that file has a
header line when received which tells me how many records are in the file
so, how will I know the end point of the loop if I don't know the number of
lines in the file
or is there another way of acheiving the same thing with the text file
format I have
Regards
Michael Bond