Ashamed to say, always make some small mistakes, tangled half a day, this should not be a semicolon of the thing toss for a long time!
Error when executing the SQL statement, the information is as follows:
Java code
[Default] [2012-11-22 11:35:58,552] [ERROR]
Java code
[com.primeton.common.connection.impl.synchronization.traceloggerstatementsynchronization:49]
Java code
Sql[insert into Ase_system_log (logid,userid,username,logintime) VALUES (?,?,?,?);] Execute error.
java.sql.sqlexception:ora-00911: Invalid character
The program code is as follows:
Java code
Copy Code code as follows:
String sql= "INSERT into Ase_system_log (logid,userid,username,logintime) VALUES (?,?,?,?);";
con = This.getdatasource (). getconnection ();
Ptt=con.preparestatement (SQL);
Ptt.setlong (1, Logid);
Ptt.setlong (2, userId);
Ptt.setstring (3,username);
Ptt.setstring (4, logindate);
Ptt.executeupdate ();
When executing the Ptt.excuteupdate () method, report the above error directly.
Think that there is a problem with the parameter assignment in SQL, but the SQL statement directly to the implementation of the Plsql, but no problem, tangled up for a long time, the original is
Copy Code code as follows:
"INSERT into Ase_system_log (logid,userid,username,logintime) VALUES (?,?,?,?);"
One more ";" No, hang-ah, this thing, I immediately have no words!!!
Well, if there is a report of the abnormal character of the basin friends can refer to, there will never be no more such a low-level error!
Caution Oneself One word: not careful is to do bad procedure.