怎么判断数据插入是否成功 45
Stringinsert="INSERTINTOcustomer(customername,sex,age,message)VALUES(?,?,?,?)";sql=co...
String insert="INSERT INTO customer(customername,sex,age,message) VALUES (?,?,?,?)";
sql=con.prepareStatement(insert);
sql.setString(1,handleString(logname));
sql.setString(2,handleString(sex));
sql.setInt(3,age);
sql.setString(4,handleString(message));
int n= sql.executeUpdate();
老提示我有sql 异常 到底错在哪?
String uri="jdbc:oracle:thin:@10.3.6.54:1521:GDYDDEVP2";
con=DriverManager.getConnection(uri,"apps","apps");这是链接oracle数据库的代码 展开
sql=con.prepareStatement(insert);
sql.setString(1,handleString(logname));
sql.setString(2,handleString(sex));
sql.setInt(3,age);
sql.setString(4,handleString(message));
int n= sql.executeUpdate();
老提示我有sql 异常 到底错在哪?
String uri="jdbc:oracle:thin:@10.3.6.54:1521:GDYDDEVP2";
con=DriverManager.getConnection(uri,"apps","apps");这是链接oracle数据库的代码 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询