This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes Help using CachedRowSet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Help using CachedRowSet" Watch "Help using CachedRowSet" New topic

Help using CachedRowSet

Joe Wilkes

Joined: Oct 29, 2005
Posts: 7
I am making a todo list for my java class and even the teacher can not help me so I though I would turn to the experts. I am using a cachedRowSet to make an array list to add my todo items. They include taskID(the primary key & auto increment), taskDesc(The todo text), DueDate(sql date format), & completed(boolean). I can get them to list everything except the taskID. It is always 0 and I can not figure out why. Here is some of my code, Here is the code part of the JSP.

Now, that will return everything in the database except the taskID.
Here is my java code

Thanks for any light you guys can shed. I need the ID so that I can link it to the delete ToDo button that will be added at a later time.
Joe Wilkes

Joined: Oct 29, 2005
Posts: 7
Is there something else I should try instead of this? Does anyone have any ideas at all?
Purushoth Thambu
Ranch Hand

Joined: May 24, 2003
Posts: 425
Did you debug the code? What was the result of todoId if ResultSet is used?. You can try to populate the CachedRowSet object using populate(ResultSet) method (just to check).
subject: Help using CachedRowSet
Similar Threads
selecting multiple rows to update value
List of checkboxes and Array/ArrayList data binding not working.
Writing Out A 2D Array With JSTL
Need help in getting check box values
JSTL, JDBC, and Result Set