views:

1616

answers:

2

I ported a Delphi 6 application to Delphi 2007 and it uses BDE to connect to an Oracle 9i database. I am getting an "ORA-01426: numeric overflow exception" when I execute a stored procedure. This happens randomly and if I re-run the stored procedure through the application with the same parameters the exception does not occur.

The old Delphi 6 application works just fine.

Ideas anybody??

Thanks Prapin

+1  A: 

Showing a code example could make this easier, but here are a couple of hunches:

  1. Are the data coming from another source (like Excel) that does not have explicit data types? Mixed or ambiguous data may be causing BDE to assign the wrong data type to a field that then is incompatible with the database field.

  2. Could be a numeric formatting issue (some U.S.-centric components do not handle localization properly). Is your localization other than English(U.S.)? Is so, does changing it to English(U.S.) fix the problem?

If these completely miss, more details might help.

Argalatyr
The stored proc is rather complex but I dont think its causing the issue. The data coming to stored proc is directly from the app and data type is proper. Also the app is running using the US locale.
A: 

Does the D6 version of the app use the same version of BDE, Oracle, and the database? If so, then it's probably something about the data being passed (either content or mechanism).

Not knowing what those data are, nor how they are passed, makes it pretty hard to diagnose.

Argalatyr
Yes, the D6 version uses the same BDE, Oracle client and database. I have a strong feeling its something related to BDE. Something must have changed in the Delphi units that interfaces with BDE. Sadly, we don't have access to the source of those units. Btw, thanks for the tips.