第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時(shí)綁定郵箱和手機(jī)立即綁定

update更新數(shù)據(jù)是出錯(cuò)

錯(cuò)誤提示:

Exception in thread "main" com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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 '='?°??¤?',sex=1,age=20,birthday='3916-05-12',email='xiaoxia@126.com',mobile='133' at line 1

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.lang.reflect.Constructor.newInstance(Constructor.java:526)

at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)

at com.mysql.jdbc.Util.getInstance(Util.java:384)

at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1054)

at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3566)

at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3498)

at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959)

at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2113)

at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2568)

at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2113)

at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1364)

at jdbc_imooc.model.godnessDao.updateGodness(godnessDao.java:65)

at jdbc_imooc.Action.GodnessAction.main(GodnessAction.java:28)

源代碼:

public void updateGodness(godness g) throws Exception {

// 獲得數(shù)據(jù)庫鏈接

Connection conn = DBUtil.getConnection();

// 執(zhí)行insert into

String sql = "" + " insert into imooc_goddness "

+ " (user_name=?,sex=?,age=?,birthday=?,email=?,mobile=?, "

+ " update_user=?,update_date=current_date(),isdel=?) "?

+ " where id=? ";

PreparedStatement ptmt = conn.prepareStatement(sql);

ptmt.setString(1, g.getUser_name());

ptmt.setInt(2, g.getSex());

ptmt.setInt(3, g.getAge());

ptmt.setDate(4, new Date(g.getBirthday().getTime()));

ptmt.setString(5, g.getEmail());

ptmt.setString(6, g.getMobile());

ptmt.setString(7, g.getUpdate_user());

ptmt.setInt(8, g.getIsdel());

ptmt.setInt(9, g.getId());

ptmt.execute();

}


正在回答

3 回答

數(shù)據(jù)庫語法錯(cuò)了,還有一個(gè)可能就是把你的參數(shù)不要填中文就可以了

0 回復(fù) 有任何疑惑可以回復(fù)我~

看下是不是換行的時(shí)候沒有加空格

0 回復(fù) 有任何疑惑可以回復(fù)我~

你這個(gè)是數(shù)據(jù)庫語句語法錯(cuò)誤,建議將生成的數(shù)據(jù)庫語句打印出來看看哪里錯(cuò)誤了

0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

update更新數(shù)據(jù)是出錯(cuò)

我要回答 關(guān)注問題
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號