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?

user9977
  • 454
  • 5
  • 5
  • There are not enough details in your question. Can you show the source code of the stored procedure? Is the error coming from inside the stored procedure, or when you call it? You can tell this from the line number Oracle reports. – WW. Dec 09 '08 at 02:24
  • The stored proc is rather complex and I do not think that its causing the issue (that's why I didn't use the Oracle tag).When I run the app it breaks randomly by throwing the ORA-01426: numeric overflow exception.If I rerun the app or manually execute the stored proc, the error does not occur. – user9977 Dec 09 '08 at 20:00
  • Did you try to trace the calls with the SQL Monitor on the BDE side? And did you try to activate Oracle trace to see what's actually sent to Oracle? –  Jul 05 '11 at 21:34

2 Answers2

2

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
  • 4,639
  • 3
  • 36
  • 62
  • 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. – user9977 Dec 09 '08 at 20:03
0

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
  • 4,639
  • 3
  • 36
  • 62
  • 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. – user9977 Dec 10 '08 at 03:11