• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question about datasource

 
Gökhan Sakalli
Greenhorn
Posts: 20
  • 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: 34860
369
Eclipse IDE Java VI Editor
  • 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: 4020
18
Eclipse IDE Flex Google Web Toolkit
  • 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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic