Hello all, I'm new to java. Here is my problem. I have a servlet which retrieves data from a database (multi row data retrieved per select)and puts the data into a hash table via row column map ex.... 1-8=Client account. Where 1 is row and 8 is the column. This works but is not very descriptive unless you know the column number to database field name relationship ( so much for good naming conventions). The question is what other way can I store the data and keep the column name and it's attributes so I can pass it along to other classes. Basically I want a resultset that does not maintain a database connection. Another reason I need this separation is so I can use connection pooling for less overhead and faster connection establishment. I have looked at a few different ways but I am lost. I need the short version of a dummys guide and a few hints from the vast experience everyone has here. Thanks
Timothy, Welcome to Javaranch! It's clearer to create an object representing the row of data. Each field would have a meaningful name. If you don't want to do that, you could use the column name as a key in your hash table.
That makes sense. Is their a way to index the objects or do I use an array list of objects and just search through the array via a for statement? Do you know of any database to object mappers that are any good? I assume we are talking jdo here. Thanks