Geeks Talk

Prepare for your Next Interview


Welcome to the Geeks Talk forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

How to read a value from resultsetobjet

This is a discussion on How to read a value from resultsetobjet within the JSP forums, part of the Web Development category; Hi, I have a doubt in servlet, How to read a value from resultsetobjet which is coming from database to textfield. When we select one value from drop-down list the ...

Go Back   Geeks Talk > Web Development > JSP
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read

JSP JSP Related Issues and Problems

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-05-2007
Expert Member
 
Join Date: Feb 2007
Posts: 1,279
Thanks: 0
Thanked 192 Times in 154 Posts
Geek_Guest has a spectacular aura aboutGeek_Guest has a spectacular aura aboutGeek_Guest has a spectacular aura about
How to read a value from resultsetobjet

Hi,

I have a doubt in servlet, How to read a value from resultsetobjet which is coming from database to textfield.

When we select one value from drop-down list the corresponding value will be displayed in corresponding textfield automatically. I need code in servlets

Question asked by visitor swapna.s
Reply With Quote
The Following User Says Thank You to Geek_Guest For This Useful Post:
Sponsored Links
  #2 (permalink)  
Old 06-15-2007
Junior Member
 
Join Date: May 2007
Location: Bangalore
Posts: 19
Thanks: 0
Thanked 1 Time in 1 Post
sweet_person is on a distinguished road
Re: How to read a value from resultsetobjet

sorry man i couldnt understand your problem. please explain your problem in eloborated manner, so that i can come with answer.
Reply With Quote
  #3 (permalink)  
Old 06-15-2007
Junior Member
 
Join Date: Apr 2007
Location: Chennai
Posts: 15
Thanks: 0
Thanked 1 Time in 1 Post
vinotha is on a distinguished road
Re: How to read a value from resultsetobjet

Hi,

try this.for eg consider u want to access the field salaray from employee table.
and u r sending empid through request.u r gettign the empid from the dropdown table .consider salary is the second field in employee table.

String result=null;
try
{
Class.forName("url");
Connection conn=Drivermanager.getConnecction("url");
Statemetn stmt=conn.createStatement();
ResultSet rst=stmt.executeQuery("select * from employee where userId = " +(request.getParameter("userID"));
result= rst.getString(2);
}
catch(SQLExceptione){
return result;
}
}
Reply With Quote
Reply

  Geeks Talk > Web Development > JSP

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Change attribute of a View to read only and editable Geek_Guest Seibel 0 04-03-2007 11:49 AM
Read all files as they arrive in directory and then process Geek_Guest Oracle 0 03-07-2007 06:34 AM
The Read/Write Web Lokesh M HTML & CSS 0 06-21-2006 12:58 AM
Software and Programs license - Must Read admin Downloads 0 05-24-2006 07:09 PM


All times are GMT -4. The time now is 10:36 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2009 GeekInterview.com. All Rights Reserved