This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question about datasource

 
Gökhan Sakalli
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello. I want to execute an SQL query in a method.

re = preparedstatement.execute(parameters);

After i invoke this method, how is the format of the rs?


And can i populate a textbox in a JSP file with my rs?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33697
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The format of the resultset depends on the SQL query. The best way to get the JSP is to store it in a data structure and then forward to the JSP.
 
Scott Selikoff
author
Saloon Keeper
Posts: 3901
16
Eclipse IDE Flex Google Web Toolkit
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At its cores, and a resultset is just a list of uniform hash maps. Each hash map contains a set of records based on your projection. I'd recommend trying some JDBC tutorials to get you familiar with it. And as Jeanne pointed out, never put JDBC code inside of a JSP!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic