I am doing a project where i need to edit/delete values in database using jsp, the values display on jsp page, at the end of each row edit and delete buttons, when i click edit button it shd display all the values in that particular row in textboxes in jsp page and i need to modify the values, same is for delete, here is my code:
Please anyone can help me to solve this. Its very urgent.
1) Please be sure to take the time to compose descriptive subjects for your posts. You will attract people who will can give you better and faster answers when your posts have good, descriptive subjects. For more information, please click this link ⇒ UseAMeaningfulSubjectLine.
Using a title such as "JAVA-JSP" isn't going to attract the attention of those who can best help you. Especially where you've already used this subject for another post.
You can change your subject line by clicking the button on your post.
2) Please be sure to use code tags when posting code to the forums. Unformatted or unindented code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please click this link ⇒ UseCodeTags ⇐ for more information.
Properly indented and formatted code greatly increases the probability that your question will get quicker, better answers.
I would love you help you, but I can't find where your problem is. Is it in editing/deleting in mysql, or is it getting your buttons to do it, and so on?
You would attract more helpful persons if you stated where it is you're having a problem, and what your thoughts about it are.
I am not getting any error with this code simply the values are not editing in the textboxes, retrieve.jsp is displaying the database table values based on Aggregated Switch, at the end of each row i have EDIT and DELETE buttons, when i click EDIT button the values of that particular row shd edit in the textboxes in next jsp page, my editData.jsp code is incorrect i guess, am getting the textboxes empty thats the problem now....can you look into my editData.jsp code and correct it please its very urgent for my project,
This is my editData.jsp code:
so, with this code the values are not editing in the textboxes, am getting empty textboxes, Please help me.
The reason why your text boxes are empty, is that you only declare the strings before you set them as value of the text boxes:
You also have to assign them values before you use them in the form. One way you can fix this, is to move the code for your form under the JSP code,
so that you are certain that the strings have values, when you 'use' them.
An example for you:
This wouldn't work:
This would just give us an empty text box.
While this would do what you want:
And we would get a text box with the value: "A string" (without the quotes). (I have excluded some of the required syntax to make the examples work,
to make it easier to follow)
Hope this cleared something up for you. If not, feel free to ask again.
Good luck with your project!
Roses are red, violets are blue. Some poems rhyme and some don't. And some poems are a tiny ad.