• Post Reply Bookmark Topic Watch Topic
  • New Topic

Assigning a DB object to a JSP variable

 
bab javier
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i need to compare a DB record to a variable inside a JSP page. Whenever i use the statement:
String s = resultSet.getString("columnName");
it results to "no data found", but when i do
<%= resultSet.getString("columnName")%>...it prints the value.
pls help...
 
Vasudevan Gopalan
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You cannot use recordset variable more than one time if you have not specified the scrollable resultset.So you put the value of resultset in a variable and compare that variable with any other variable.
 
bab javier
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi! thank you very much. it's already working!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!