954,574 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

display corresponding values

Hi, everyone i want to display the corresponding values when i click on the primary key ... How to do this in jsp...???

Thanks in advance

gautam.ap
Newbie Poster
1 post since Jun 2009
Reputation Points: 10
Solved Threads: 0
 

Using request, response and SQL API.

__avd
Posting Genius (adatapost)
Moderator
8,648 posts since Oct 2008
Reputation Points: 2,136
Solved Threads: 1,241
 

request method is one of the more basic one you sure u dont know that? or are you facing a different set of problem?

dreamer14
Light Poster
31 posts since Sep 2008
Reputation Points: 10
Solved Threads: 1
 
request method is one of the more basic one you sure u dont know that? or are you facing a different set of problem?

Why you are not coding? Please code and if you get some problems then ask for help.

...
   Class.forName("DB Driver");
   Connection cn=DriverManager.getConnection(url,username,password);
   Statement st=cn.createStatement();
   ResultSet rs=st.executeQuery("select * from tab where pkcol='" + request.getParameter("pk_text") + "'");
  if(rs.next()) {  // Found
          ....
          out.println(rs.getString(1) + ...... );
  }
 else
       out.println("Not found");
  ...
__avd
Posting Genius (adatapost)
Moderator
8,648 posts since Oct 2008
Reputation Points: 2,136
Solved Threads: 1,241
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You