aspose file tools
The moose likes Servlets and the fly likes How to display fields retrieved from a database in Editable mode? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "How to display fields retrieved from a database in Editable mode?" Watch "How to display fields retrieved from a database in Editable mode?" New topic
Author

How to display fields retrieved from a database in Editable mode?

Vineet Sharma
Ranch Hand

Joined: Dec 30, 2000
Posts: 51
I have a servlet that uses JDBC to connect to Access and reads a table. I need to display the data retrieved from the table on an HTML screen in editable mode. In othe words, the user should be able to change the data that I display on the screen, eg., updating user profile.
I am doing the following but it's not working:
htmlString +="TD>" + dbRS.getString(1) = "</TD>";
I would appreciate any feedback.
Thanks,
Vineet
Marius Holm
Ranch Hand

Joined: Sep 11, 2000
Posts: 84
Hi Vineet,
Then you must use a HTML Element that is editable, as an 'INPUT' element.
htmlString +="TD>" + dbRS.getString(1) = "</TD>";
should be replaced with:
htmlString +="INPUT TYPE='TEXT' NAME='"+ dbRS.getString(x) +"' VALUE='"+ dbRS.getString(1) + "' />";
I've also added a NAME attribute to the INPUT element, as you will need this to update your db when the form is sent.
Good luck,
Marius
Vineet Sharma
Ranch Hand

Joined: Dec 30, 2000
Posts: 51
Thanks Marius for your help. I will try implementing your suggestion.
-Vineet

Originally posted by Vineet Sharma:
I have a servlet that uses JDBC to connect to Access and reads a table. I need to display the data retrieved from the table on an HTML screen in editable mode. In othe words, the user should be able to change the data that I display on the screen, eg., updating user profile.
I am doing the following but it's not working:
htmlString +="TD>" + dbRS.getString(1) = "</TD>";
I would appreciate any feedback.
Thanks,
Vineet

 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: How to display fields retrieved from a database in Editable mode?
 
Similar Threads
How to display fields retrieved from a database in Editable mode?
How to display fields retrieved from a database in Editable mode?
Runtime Html Menu in Jsp Page
jsp
How to display fields retrieved from a database in Editable mode?