Wrong return from GetFieldValue() with decimal field
Hi there,
I'm using MFC CRecordset to retrieve data from a Oracle Database 10g.
All is good except if a data type in database is NUMBER(x, y).
I looked into m_nSQLType of CODBCFieldInfo struct and it's correct, returning 3 (SQL_DECIMAL).
So, the function GetFieldValue(LPCTSTR lpszName, CDBVariant& varValue) returns a CDBVariant with wrong data type. He throws it as String instead of double.
I tried it with NUMBER (without precision) and it worked fine, but i need that precision.
Re: Wrong return from GetFieldValue() with decimal field
have you tried using SQL_C_DOUBLE as the third param in the function call ???
GetFieldValue(lpszName, varValue, SQL_C_DOUBLE)
Jim
ATP BE400 CE500 (C550B-SPW) CE560XL MU300 CFI CFII
"The speed of non working code is irrelevant"... Of course that is just my opinion, I could be wrong.
"Nothing in the world can take the place of persistence. Talent will not; nothing is more common than unsuccessful men with talent. Genius will not; unrewarded genius is almost a proverb. Education will not; the world is full of educated derelicts. Persistence and determination are omnipotent. The slogan 'press on' has solved and always will solve the problems of the human race."...Calvin Coolidge 30th President of the USA.
Jim
ATP BE400 CE500 (C550B-SPW) CE560XL MU300 CFI CFII
"The speed of non working code is irrelevant"... Of course that is just my opinion, I could be wrong.
"Nothing in the world can take the place of persistence. Talent will not; nothing is more common than unsuccessful men with talent. Genius will not; unrewarded genius is almost a proverb. Education will not; the world is full of educated derelicts. Persistence and determination are omnipotent. The slogan 'press on' has solved and always will solve the problems of the human race."...Calvin Coolidge 30th President of the USA.
Bookmarks