0
を実行できませんでした:は、私は、データベース列内のいくつかのデータを更新するために、SQLクエリを実行しようとしていますが、私はプログラムを実行すると、私は次のエラーを取得する文の更新
Hibernate: update DeputeAppeal set FilePath=/home/oleg/DeputeAppealsFiles/1 where id=38
[ERROR] [http-bio-8080-exec-2 09:21:21] (SqlExceptionHelper.java:logExceptions:131) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '/home/oleg/DeputeAppealsFiles/1 where id=38' at line 1
これは方法でありますDAO:
public void editFilePathName(DeputeAppeal deputeAppeal, String filePathName) {
Query query = sessionDao.getSession().createSQLQuery("update DeputeAppeal set FilePath=" + filePathName + " where id=" + deputeAppeal.getId());
query.executeUpdate();
}
あなた、ありがとう –
あなたは歓迎です –