You are assigning User name exists value to variable error inside catch block, means it's raising some exception. Instead of assigning that message, you may wish to print the exception log trace, to figure out what exactly is going wrong. You could also try this error=e.toString(), this should print the actual exception on the page and might help you to figure out the real problem.
Joined: Nov 10, 2012
ok as suggested i founded that my sql query is not correct.. so i changed it to
String s = "insert into login values('upop','yss','ysss','asdy','aysdq',54,0);";
but even now my data is not getting entered into databse ... please help