J
JT
i have written some asp that reads a fixed length text file, line by line,
inserting each line into my database. my problem is that the text file
format seems to have extra space at the end of the file so my code thinks
there is actually one more line when there is not. is there a way to remove
these spaces before i loop through the file?
here is my sample code:
Do While df.AtEndOfStream <> True
line = df.ReadLine
account_no = trim(mid(line,3,9))
account_no = cleansedata(account_no, 1)
customer_name = trim(mid(line,12,28))
customer_name = cleansedata(customer_name, 1)
etc., etc.
Loop
inserting each line into my database. my problem is that the text file
format seems to have extra space at the end of the file so my code thinks
there is actually one more line when there is not. is there a way to remove
these spaces before i loop through the file?
here is my sample code:
Do While df.AtEndOfStream <> True
line = df.ReadLine
account_no = trim(mid(line,3,9))
account_no = cleansedata(account_no, 1)
customer_name = trim(mid(line,12,28))
customer_name = cleansedata(customer_name, 1)
etc., etc.
Loop