parse file with ProgressBar

Just starting out? Need help? Post your questions and find answers here.
z3phir2003
User
User
Posts: 49
Joined: Wed Jan 12, 2005 3:50 pm

parse file with ProgressBar

Post by z3phir2003 »

hi

i need to parse a text file (csv) and for every line insert some content in sqlite database the parsing and inserting is not a problem.
my problem is i want to display a progres of the parsing using a ProgressBar
i don't know how many lines the file will have

i tried incrementing the position with 1 unit / line dosen't work the ProgressBar fill's up but the parsing is far from finised.

any ideea how to make this ?
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

Yes. Set the progress bar's maximum to Lof() before you start. After you've read a line, set the bar's value to Loc().
z3phir2003
User
User
Posts: 49
Joined: Wed Jan 12, 2005 3:50 pm

10x

Post by z3phir2003 »

10x u'r a Lifesaver
Post Reply