問(wèn)題描述
通過(guò) vb 代碼運(yùn)行時(shí),將 IDENTITY 轉(zhuǎn)換為數(shù)據(jù)類(lèi)型 int 時(shí)發(fā)生算術(shù)溢出錯(cuò)誤.但是當(dāng)我執(zhí)行存儲(chǔ)過(guò)程時(shí),數(shù)據(jù)被正確插入.
Arithmetic overflow error converting IDENTITY to data type int, is occurring when running through vb code. But when I execute the stored procedure, data gets inserted properly.
通過(guò)應(yīng)用程序有時(shí)也可以,有時(shí)不可以.
Through application also sometimes this works and sometimes it doesn't.
當(dāng)我檢查當(dāng)前標(biāo)識(shí)值和當(dāng)前列值不同時(shí).這是否屬于問(wèn)題.
When I check the current identity value and current column values are different. IS this falls under issue.
請(qǐng)告訴我如何解決它.
推薦答案
2147483647
是 INT
的最大尺寸,所以你的 IDENTITY
是比這個(gè)大.您可以使用 BIGINT
來(lái)解決您的錯(cuò)誤,假設(shè)您的 IDENTITY
不會(huì)超過(guò) 9223372036854775807
.
2147483647
Is the maximum size for INT
so somewhere your IDENTITY
is larger than this. You can use BIGINT
instead to get around your error, assuming your IDENTITY
won't surpass 9223372036854775807
.
這篇關(guān)于將 IDENTITY 轉(zhuǎn)換為數(shù)據(jù)類(lèi)型 int 的算術(shù)溢出錯(cuò)誤的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!