我不得不扩充遗留应用程序来处理64位整数.但是,VB6没有这种数据类型.我发现在线的推荐是使用货币数据类型.
但是,我发现我遇到了一些溢出问题.
示例 - CCur调用期间溢出的结果:
dim c as currency
' set maximum value of int64
c = CCur("9223372036854775807")
Run Code Online (Sandbox Code Playgroud)
但是,如果我应用较小的数字(但仍然比int32大得多),它确实有效:
dim c as currency
' Remove the last 4 digits
c = CCur("922337203685477")
Run Code Online (Sandbox Code Playgroud)
那我在这里错过了什么?如何处理64位值?
我需要对64位值执行的唯一操作是从SQL Server存储过程(它是sql类型bigint)中读取它们然后将其显示到表单.
vb6 ×1