"delusion" <my*******************@yahoo.co.uk> wrote in message
news:e2**************************@posting.google.c om...
"Hrvoje Somun" <hr****************@zg.tel.hr> wrote in message
news:<bo**********@sunce.iskon.hr>... 1.if all rows and all data (IDno, Name, Company, Adress) are equal
length then you can do it easily if you make a loop for1 to last IDno and
substring data.
<snip>
I agree with the first method even though you didn't tell him any file
stuff ie. how to open the file how to read through it etc.
yes, but that part is in any java tutorial
but ...
i'm intrigued
you propose
or
3. use XML :)
as a solution
please tell .... how would you use xml to do something like this and
integrate it into java?
please tell me
if he wants to insert data from *.txt to rational database and use java as a
tool to do it he can use xml file instead of txt file, he sould transform
his txt file into smoething like;
<customer ID="123456">
<name>John Smith</name>
<company>Acme Boxes Inc</comapny>
<adress>100 Someplace Drive</adress>
</customer>
use some parser (if all his data about customers is in a single file then
SAX), and insert data into database.
?
i did it few times.
yes, if he cant change txt file then this way is not good, but if he is just
starting to build hiss application he should use this metod(XML has many
other advantages.....)
Hrvoje J. Somun