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

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

mysql一直報(bào)錯(cuò),這是什么原因呢?

mysql一直報(bào)錯(cuò),這是什么原因呢?

瀟瀟雨雨 2019-04-26 18:15:02
Exception in thread "main" org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [update account set  money = money - ? where username = ?]; Data truncation: Truncated incorrect DOUBLE value: 'xxx'; nested exception is com.mysql .jdbc.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE value: 'xxx'     at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:102)     at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73)     at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:82)     at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:82)     at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:655)     at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:876)     at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:937)     at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:947)     at org.cwj.Dao.Imp.AccountDaoImp.out(AccountDaoImp.java:29)     at org.cwj.Service.Imp.AccountServiceImp.trand(AccountServiceImp.java:33)     at org.cwj.Text.Text.main(Text.java:29) Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE value: 'xxx'     at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4230)
查看完整描述

3 回答

?
12345678_0001

TA貢獻(xiàn)1802條經(jīng)驗(yàn) 獲得超5個(gè)贊

Exception in thread "main" org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [update account set money = money - ? where username = ?]
看下這個(gè)SQL 的參數(shù) money 傳入的值的長(zhǎng)度跟數(shù)據(jù)庫(kù)類型的長(zhǎng)度肯定不一致導(dǎo)致了入庫(kù)截?cái)喈惓A恕?/p>

查看完整回答
反對(duì) 回復(fù) 2019-05-14
?
紫衣仙女

TA貢獻(xiàn)1839條經(jīng)驗(yàn) 獲得超15個(gè)贊

update account set money = money - ? where username = ?
應(yīng)該是這一句傳入的數(shù)據(jù)長(zhǎng)度不對(duì),有可能是你傳入的數(shù)據(jù)類型是double,但是數(shù)據(jù)庫(kù)設(shè)定的numeric長(zhǎng)度不夠,可以設(shè)置斷點(diǎn)或者打印出來(lái)看一下

查看完整回答
反對(duì) 回復(fù) 2019-05-14
?
神不在的星期二

TA貢獻(xiàn)1963條經(jīng)驗(yàn) 獲得超6個(gè)贊

大概率數(shù)據(jù)查詢語(yǔ)句的錯(cuò)誤


查看完整回答
反對(duì) 回復(fù) 2019-05-14
  • 3 回答
  • 0 關(guān)注
  • 1417 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號(hào)

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