問題描述
通過 vb 代碼運行時,將 IDENTITY 轉換為數據類型 int 時發生算術溢出錯誤.但是當我執行存儲過程時,數據被正確插入.
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.
通過應用程序有時也可以,有時不可以.
Through application also sometimes this works and sometimes it doesn't.
當我檢查當前標識值和當前列值不同時.這是否屬于問題.
When I check the current identity value and current column values are different. IS this falls under issue.
請告訴我如何解決它.
推薦答案
2147483647
是 INT
的最大尺寸,所以你的 IDENTITY
是比這個大.您可以使用 BIGINT
來解決您的錯誤,假設您的 IDENTITY
不會超過 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
.
這篇關于將 IDENTITY 轉換為數據類型 int 的算術溢出錯誤的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!