Reputation: 1
At line 29 it says ORA-00907: missing right parenthesis I have marked the line with the no 29 I am unable to understand where the paranthesis is missing
<%
String r = request.getParameter("t1");
String n = request.getParameter("t2");
String d = request.getParameter("t3");
String b = request.getParameter("t4");
String y = request.getParameter("t5");
String c = request.getParameter("t6");
String bg = request.getParameter("t7");
long cno=Long.parseLong(c);
String x="N.A";
Class.forName("oracle.jdbc.OracleDriver");
Connection cn = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE", "aman", "123456");
PreparedStatement ps = cn.prepareStatement("update icard2 set rollno=(?=r),name=(?),dob=(?),branch=(?),year=(?),contact=(?),bloodgroup=(?),photofile=(?),collname=(?),colllogo=(?) where rollno=r");
ps.setString(1,r);
ps.setString(2,n);
ps.setString(3,d);
ps.setString(4,b);
ps.setString(5,y);
ps.setLong(6,cno);
ps.setString(7,bg);
ps.setString(8,x);
ps.setString(9,x);
ps.setString(10,x);
**29** ps.executeUpdate();
ps.close();
cn.close();
out.println("Record Updated");
%>
Upvotes: 0
Views: 75
Reputation: 35008
The error is in your SQL statement. This does not look like valid SQL:
set rollno=(?=r)
Upvotes: 1