table:
CREATE TABLE STU(ID INT PRIMARY KEY, NAME VARCHAR2(20), AGE INT)
INSERT INTO STU VALUES(1, 'ZJW', 24)
INSERT INTO STU VALUES(2, 'YGL', 25)
INSERT INTO STU VALUES(3, 'ZLY', 24)
INSERT INTO STU VALUES(4, 'LBZ', 22)
cpp code:
int nId;
string strName;
int nAge;
cout << "ID\t" << "NAME\t" << "AGE" << endl;
while (rs->next() == true)
{
// get values using the getXXX() methods of Resultset
nId = rs->getInt(1);
strName = rs->getString(2);
nAge = rs->getInt(3);
cout << nId << "\t" << strName << "\t" << nAge << endl;
}
when i use occi to query data from oracle, i get this error: ORA-01455: converting column overflows integer datatype
my system is centos 64bit,and i know int is 2147483647,and oracle INTEGER is -231) to (231)-1. so why i get this overflow error? tks.