Sorry if this problem has already been adressed earlier , i could not find
it.
Our application :VB5 /MDAC 2.0/Microsoft ODBC/Oracle 7 client/Oracle 8
database worked perfectly
BUT
some PC moved to win XP and
we had to use Oracle 9 client , so
VB5/MDAC 2.0/Oracle 9 client ODBC/Oracle 9 Client/Oracle 8 database does
not correctly access
decimal numbers:decimal numbers fetched from the database are either
truncated (35.48 -> 35.00) or
multiplicated (35 ->3500).
A similar (not exactly the same) problem occurs with crystal report.
We tried to analyze things with crystal:
Crystal/oracle driver 7 for odbc -> OK
Crystal/Oracle OLE DB driver 9 ->OK
Crystal/Oracle 9 ODBC driver -> NOT OK
We thought of an NLS (france) problem ( , <-> .) and changed things on the
server and/or client:
nothing changed.
Have no more ideas (moving to OLE DB is a worst case solution ??)
Thanks for any help
n> Sorry if this problem has already been adressed earlier , i could
n> not find it.
n> Our application :VB5 /MDAC 2.0/Microsoft ODBC/Oracle 7 client/Oracle
n> 8 database worked perfectly
n> BUT
n> some PC moved to win XP and
n> we had to use Oracle 9 client , so
n>
n> VB5/MDAC 2.0/Oracle 9 client ODBC/Oracle 9 Client/Oracle 8 database
n> does not correctly access
n> decimal numbers:decimal numbers fetched from the database are either
n> truncated (35.48 -> 35.00) or
n> multiplicated (35 ->3500).
n>
n> A similar (not exactly the same) problem occurs with crystal report.
n>
n> We tried to analyze things with crystal:
n> Crystal/oracle driver 7 for odbc -> OK
n> Crystal/Oracle OLE DB driver 9 ->OK
n> Crystal/Oracle 9 ODBC driver -> NOT OK
n>
n> We thought of an NLS (france) problem ( , <-> .) and changed things
n> on the server and/or client:
n> nothing changed.
Unfortunately, Oracle 8 (and 9 I think) ODBC drivers behave as normal Oracle
clients respecting NLS settings while converting decimal numbers to/from
strings. This does not conform to the ODBC specification which states dot
(.) as a decimal separator.
Some MDAC/Crystal versions seem to take this into account, but others may
not.
Possible workarounds:
(1) Try execute "Set NLS_..." statement after connecting but before any
queries.
(2) Provide correct input string or parse output string accordingly.
(3) Bind columns as SQL_C_FLOAT or SQL_C_DOUBLE.
Though, if you use VB and DAO, (2) and (3) are hardly available.
--
HTH,
Dmitri Ivanov
Common Lisp ODBC interface - www.ystok.ru
In addition to Dimitri's suggestions, you can look at other ODBC Drivers for Oracle. Our ODBC Drivers for Oracle do not have this problem and they are obtainable on a free 30 day evaluation basis from: http://www.openlinksw.com
Regards,
Kingsley Idehen
OpenLink Software http://www.openlinksw.com/blog/~kidehen