Now I get an empty table :| I know it is caused when I clear temp vector but I dont know how to make it work the way I need.. Edit: Nice work :| [ May 24, 2002: Message edited by: Martin Schneider ] [ Edited by Dave to fix the smiley ] [ May 24, 2002: Message edited by: David O'Meara ]
rather than clearing the Vector each time, create a new one for each use.
( add is preferred to addElement as of JDK1.2 so that it fits into the Collections Framework) Dave
Martin Schneider
Ranch Hand
Joined: May 16, 2002
Posts: 42
posted
0
Thanks, but I was wondering if that kind of solutions is good if I need to select many rows from db and then print those to screen? In other word are vectors right way to deal in such an issue?
Originally posted by Martin Schneider: Thanks, but I was wondering if that kind of solutions is good if I need to select many rows from db and then print those to screen? In other word are vectors right way to deal in such an issue?
using a Vector might be overkill, if you don't need the synchronization aspect of the Vector, then try using an ArrayList. It is the equivalent to Vector but without the overhead of the synchronization. define "many rows" for us. To some 50 rows is many, to others 10,000 rows is many...etc. How many rows do you expect? Jamie
Martin Schneider
Ranch Hand
Joined: May 16, 2002
Posts: 42
posted
0
Ok, so I'd say I need to print 100 rows at maximum. Another aspect that is supposed to implement is ability to modify those rows. If I use table to display rows, is there any way to let user modify information?
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.