This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes JDBC and the fly likes Urgent: Setting values for the bind parameters of a RowSet query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Urgent: Setting values for the bind parameters of a RowSet query" Watch "Urgent: Setting values for the bind parameters of a RowSet query" New topic
Author

Urgent: Setting values for the bind parameters of a RowSet query

raj agastya
Greenhorn

Joined: Nov 27, 2001
Posts: 22
Hi,
I am using JDBC rowset to display values from an Oracle database. I am using the setter methods to set username, password, port, sid, host, query. Now that my query has some input parameters, I tried using rowset.getXXX methods to pass values for the bind parameters. I get NullPointerException while doing setXXX.
How do I set values for the bind parameters for a rowset or how do I create a query having bind parameters and pass values for them using rowset?
BTW, I know doing this using normal the PreparedStatement and populating the rowset with the resultset. But is it not possible to do it directly i.e using only the rowset object?
Please help. Below is the code I used:

Thanks
-raj
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Urgent: Setting values for the bind parameters of a RowSet query
 
Similar Threads
SQL injection?
JDBC Prepared Statement - multiple datatypes as input
linkedList getting null element
what is sqlj?
using datasource help