GeeCON Prague 2014*
The moose likes JDBC and the fly likes How to display fields retrieved from a database in Editable mode? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC
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

[This message has been edited by Thomas Paul (edited January 25, 2001).]
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
You didn't like my answer the last time you asked this?
If you want it editable then you have to put the results into text boxes using html input tags.

So you have to do this:
htmlString =+ "<td><input type=text name=field1 value=" + dbRS.getString(1) + "></TD>";

[This message has been edited by Thomas Paul (edited January 25, 2001).]


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
 
GeeCON Prague 2014
 
subject: How to display fields retrieved from a database in Editable mode?