Guest User

Untitled

a guest
May 16th, 2018
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. String url = "jdbc:mysql://127.0.0.1:3306/mydatabase";
  2. String user = "root";
  3. String passwd = ".........";
  4. String unicode= "?useUnicode=yes&characterEncoding=UTF-8";
  5.  
  6. setConnection((Connection) DriverManager.getConnection(url+unicode, user, passwd));
  7.  
  8. query3 = "INSERT INTO keyword (idkeyword, keyword) VALUES ("+keyWord.getId()+",'عماد')";
  9. Statement state7 = (Statement) connection.createStatement();
  10. state7.executeUpdate(query3);
  11.  
  12. java.sql.SQLException: Incorrect string value: 'xD8xB9xD9x85xD8xA7...' for column 'keyword' at row 1
  13. at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:965)
  14. at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3976)
  15. at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3912)
  16. at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2530)
  17. at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2683)
  18. at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2482)
  19. at com.mysql.jdbc.StatementImpl.executeUpdateInternal(StatementImpl.java:1552)
  20. at com.mysql.jdbc.StatementImpl.executeLargeUpdate(StatementImpl.java:2607)
  21. at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1480)
  22. at controller.DataBaseAccess.saveProject(DataBaseAccess.java:285)
Add Comment
Please, Sign In to add comment