read text file with stange format

J

John

I have a text file that is formatted like this:

123456789 SOLD 1
12/12/2006 Smith 45,525


987654321 SOLD 3
01/01/2006 Jones 23,252


I need to read this file and parse the data and then load it into the
database. I can get the values for line one but how can I get the values for
the next line? I'm using the substring() method to get my data but when I
try and get the second line its returning me the data for the first line
 
?

=?ISO-8859-1?Q?G=F6ran_Andersson?=

It sounds like a simple mistake in the code, like reading from the wrong
string variable, or something.

What does the code look like?
 
J

John

the code is just reading the file line by line and getting the string value
using string.substring() method
the code works with all of the other files it reads and uploads, I just have
a newly formatted file that needs to be read
 
?

=?ISO-8859-1?Q?G=F6ran_Andersson?=

The substring method can't return characters from any other string than
the one used to call the method.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top