i havea jsp page to registere a new user.while accepting user name & password from the jsp page.........the JDBC is throwing a below mentioned error.
Exception is ;com.mysql.jdbc.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE value: 'rocker'
I think you didn't get the point yet.
The SQL query you are firing is:
insert into login_detail set name = 'username' + password='password'
where '+' has no meaning..
instead the query must be like this:
insert into login_detail set name = 'username', password='password';
Hope this helps..
Praveen Kumar Singh
Joined: Oct 05, 2009
i have made some changes in query & now the same is working fine.
The changes which i have made is mentioned below.
String sql = "INSERT INTO user(user,password) VALUES ('"+username+"','"+password+"' )";
String sql1 = "insert into user_info(FNAME,MNAME,LNAME, user)values('"+firstname+"','"+middlename+"','"+lastname+"','"+username+"')";