In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article shows you the solution to the error report of sql invalid characters executing sql statements. The content is concise and easy to understand, which will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
Speaking of shame, always make some small mistakes, entangled for a long time, this should not be a semicolon thing for a long time! When the error occurs when the SQL statement is executed, the message is as follows:
Java Code [default] [2012-11-22 11 ERROR 3558 552]
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 program code is as follows:
Java code
The code is 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 (3Min username); ptt.setString (4, loginDate); ptt.executeUpdate ()
When the ptt.excuteUpdate () method is executed, the above error is reported directly. Thought that there was a problem with parameter assignment in sql, but it was no problem to copy the sql statement directly into PLSQL. After a long time of entanglement, it turned out that the code was as follows: "INSERT INTO ASE_SYSTEM_LOG (LOGID,USERID,USERNAME,LOGINTIME) VALUES (?,?)"; "there is one more"; "sign, on this thing, I am immediately speechless!
Well, if you have reported abnormal characters, you can refer to it, and if you don't have it, you should never send such a low-level error again! Warn yourself: you can't do a good program if you're not careful.
The above is the solution to the error report of sql invalid characters executing sql statements. Have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.