> Too true... except stupid csvjdbc doesn't support ORDER BY or even
> WHERE... :( As far as I can tell, it doesn't even support selecting
> anything but SELECT *... i.e. I did "SELECT name FROM table" and it
> selected everything. Kinda sucks. Thanks though.
i found that when working with csv files and java, vectors come in very
handy, i find them much more dynamic than arrays, and the native
methods you can perform on vectors are quite handy. sorting is a
breeze, and comparisons on values are just as simple.
i usually pull any resultsets into vectors, perform any operations i
need to do on the data, and write it all back to a database or csv
file..... whatever suits best.
just build a java class that contains all your methods to translate
from resultset to vector, and from vector back to resultset, or
straight to csv string :P
i find it simplifies things to have 3 classes, keeping your code neat,
and reusable....
1. one class handles all db connectivity,
2. the other handles the compilations of a prepared sql statements, and
retrieving resultsets to vector or arrays,
3. and the 3rd handles your gui, input methods, and parsing of values
to your methods in your #2 class.
But thats just me... try out vectors.
> > Too true... except stupid csvjdbc doesn't support ORDER BY or even
> > WHERE... :( As far as I can tell, it doesn't even support selecting
[quoted text clipped - 5 lines]
> Easiest thing I can think of is insert the data into an Array and then
> using the Arrays sort utility. Quick and dirty...
MyClue - 04 Aug 2006 20:13 GMT
Sounds like some great ideas to me. We (my company) are thinking about
switching utilities/drivers to another utility since we're trying to
write as little supporting code as possible. (We need to avoid having
to train people if someone leaves) This whole project has been really
neat though.
> i found that when working with csv files and java, vectors come in very
> handy, i find them much more dynamic than arrays, and the native
[quoted text clipped - 31 lines]
> > Easiest thing I can think of is insert the data into an Array and then
> > using the Arrays sort utility. Quick and dirty...