Hello,
I have a simple Oracle stored function as follows:
CREATE OR REPLACE FUNCTION test_double(a_in NUMBER) RETURN NUMBER IS
BEGIN
RETURN a_in;
END test_double;
And a simple test window with a multilineedit and command button whose clicked event script follows:
double ldb_in, ldb_out
int li
DECLARE test_double PROCEDURE FOR TEST_DOUBLE( :ldb_in );
ldb_in = 17164295
for li = 1 to 10
execute test_double;
fetch test_double into :ldb_out;
mle_1.text += 'in: ' + string(ldb_in) + ' out: ' + string( ldb_out) + '~r~n'
close test_double;
ldb_in++
next
When this runs in PB2017 R3 connected using the O10 driver, the result is as follows:
in: 17164295 out: 17164296
in: 17164296 out: 17164296
in: 17164297 out: 17164296
in: 17164298 out: 17164298
in: 17164299 out: 17164300
in: 17164300 out: 17164300
in: 17164301 out: 17164300
in: 17164302 out: 17164302
in: 17164303 out: 17164304
in: 17164304 out: 17164304
When the ORA driver is used, the "out" values are exactly the same as the "in" values. In PB12.5 no matter which driver is used O10 or ORA the result is also correct. I was wondering if anyone knows anything about this change of the O10 driver in PB2017.
Thanks for your reply! I know that changing the datatype changes the result, whether it's decimal or long, but we are talking about migration of a big application from PB12.5 to PB2017 where all these places that are using doubles work as expected with O10. BTW, what Oracle datatype does match PB double? Could you maybe give a reference to online help where the matching is described? For example, if I use PB IDE Paste Special in a transaction object Local External Function declaration, PB inserts the following:
function double TEST_DOUBLE(double A_IN) RPCFUNC ALIAS FOR "~"MYSCHEMA~".~"TEST_DOUBLE~""