i am writing a code to enter datas from a jsp where in the table created consists of 3 cols Query_ID, Query_Raised and TR. here Query_ID is to be assigned automatically, Query_Raised is to be taken from another page where the field name is txt2, and TR is the system time. please help me with the below code. And also i am receiving an error as java.sql.SQLException: Invalid column index .
1. Read the error message. It talks about an invalid column index in your SQL call so you know where to start looking.
2. So look at your SQL and count the parameters you want to pass in.
3. Look at the lines where you set these parameters and see if you can figure out where the problem is.
By the way, you shouldn't data access code in your JSPs anyway.
Joined: Jul 16, 2012
Hi Chris and Wendy,
Thanks for your answers. my previous error was solved, but the problem i'm getting is that i'm able to see both time and date but i want only time and it should be system time. here i'm unable to get system time it is showing 12:00:00:00 AM. And thanks for suggesting me to use servlets instead of JSPs and could you also suggest me some good sites to learn servlets as i'm totally new to J2EE.