- 論壇徽章:
- 0
|
if (odefin(&cda, 3, (ub1 *) & v_value, (ub4) sizeof(ub4),
(sword) SQLT_INT,
(sword) - 1, (sb2 *) 0, (text *) 0, -1, -1,
(ub2 *) 0, (ub2 *) 0)) {
err_report(&cda);
do_exit(OCI_EXIT_FAILURE);
執(zhí)行后:
-- ORACLE error when processing OCI function OFETCH, OFEN
ORA-01455: converting column overflows integer datatype
2008-08-20 16:23:30: 4 : 36399141 238 : 168838164
我看了,數(shù)據(jù)庫有個值很大:88116628908
如果修改了函數(shù)的數(shù)據(jù)實參:
if (odefin(&cda, 3, (ub1 *) & v_value, (ub4) sizeof(ub4),
(sword) SQLT_NUM,
(sword) - 1, (sb2 *) 0, (text *) 0, -1, -1,
(ub2 *) 0, (ub2 *) 0)) {
err_report(&cda);
do_exit(OCI_EXIT_FAILURE);
不會拋出溢出,結(jié)果如下:
***連接到ORACLE的用戶是: OCITEST, 輸出信息格式: 日期 [statistic# : value]***
2008-08-20 16:25:13: 4 : 1546134980 115 : 340920774 238 : 1413808837
數(shù)據(jù)根本就與數(shù)據(jù)庫中的不符,如何解決?
[ 本帖最后由 xzh2000 于 2008-8-21 10:21 編輯 ] |
|