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

Problem inserting data into database



Enter the name of the new table:

Enter the number of the table:

sheetaljagwani
Newbie Poster
1 post since Sep 2006
Reputation Points: 10
Solved Threads: 0
 

Hi
Did you find out the solution about how to enter the integer or datetime values from HTML form data???
If yes then please let me know what you did!!!

thanks

harpalshergill
Newbie Poster
2 posts since Dec 2006
Reputation Points: 10
Solved Threads: 1
 

Hi

It shows that the variables number and name are undefined,So place the

String name= request.getParameter("table_name");
String number = request.getParameter("table_number");

before

String query = "insert into benthic_query values('"+name+"', '"+number+"')";


Regards,

techkar
Newbie Poster
18 posts since Feb 2006
Reputation Points: 10
Solved Threads: 1
 

Any idea about inserting DateTime format from form feils which is a string to an ORALCLE Database??

harpalshergill
Newbie Poster
2 posts since Dec 2006
Reputation Points: 10
Solved Threads: 1
 

You do I hope realise that it's very bad practice to do such things in a JSP?

Send the form submit to a servlet and do it there, then send the result of that operation back to a JSP for display.

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You