This content has been marked as final. Show 1 reply
Did you ever get a response or figure this out?
My problem is fairly simliar, but specific to an 22.214.171.124 and onward release of the Oracle Client.
Current C++ Application using ODBC API calling Oracle Client 10g (all versions), 11gR1 (v126.96.36.199) returns a LONG (4-byte integer) for "SELECT COUNT(*) from tablename"
Change Oracle client to 11gR1 (v188.8.131.52) or higher (11.2.x.y etc) and that same statement returns a DOUBLE (8-byte floating value equivalent to oracle NUMBER data type).
Since the backend DB is the same version, there must be a client side setting (I presume) that has changed the default behaviour of this Aggregate SQL function to return a double rather than a long. I'm hoping to find such a setting that I can either set programmatically through an ODBC API call, or in the Oracle Client configuration itself.
I even tried using SQL CAST to make it an INT SELECT CAST(COUNT(*) AS INT) FROM tablename but that still returns a DOUBLE (8-byte floating NUMBER).
Note: given that I use ODBC, I've written alot of generic C++ code supporting the return value as LONG, as that is how it's been for 10 years via ODBC. I'd like to maintain that if possible without having to write ORACLE specific code within my applications.