Re: Problems with decimals in an APPEND FROM using Oracle 8i

From: Igor Korolyov (k1i2v3_at_km.ru)
Date: 03/15/04


Date: Tue, 16 Mar 2004 01:13:04 +0200

Hi, Rodolfo!
You wrote on Mon, 15 Mar 2004 04:31:10 -0800:

RR> I'm working with VFP6 SP5 - XPPro - Oracle8i

RR> Using a SQLCONNECT command, i get a cursor from Oracle8i database and
RR> the fields with decimals are correctly retrieved;

[Sorry, skipped]

Are you absolutely sure that they are retreived correctly? There is one big
bug with "
Oracle ODBC driver" (and someimes even with MS one - "Microsoft ODBC for
Oracle") - they retreive data with decimals in incorrect form - so it is OK
when you see on it in browse or grid, but it will lost all the decimal part
when you'll try to work with it - even simple

? csr.nFieldWithDecimals

Will show the error - no decimal part at all.
So I'll say you have to see if you really have this problem, or another one.
I don't know any reliable way to solve the problem - I usually use MS ODBC
driver, and If I have problems with it - I try to reinstall different
versions of Oracle Client software - 8.1.5, 8.1.7, 9.0, 9.2
Another option will be in removing decimal fields at all - rereive them as
character ones (TO_CHAR()), or multiply to shift decimal part left - say
nNUMBER8_2Field*100. Then you may restore decimal field on client side...

RR> Seems to me there's some incompatibility in the APPEND FROM command,
RR> because I used a COPY TO command instaead, and the decimals where
RR> transferred OK to a new table.

COPY TO will "dump" what you have in cursor - so even this half-erroneous
decimal fields will be transfered in their unchanged form - but you'll again
have problem when you'll try to access this data (and you'll see it OK in
BROWSE window).

-- 
WBR, Igor