oracle exception in some machines

serifelsenserifelsen Unknown
edited 11:51AM in FastReport 4.0
Hi,

I have seen that my report throws oracle exception in some machines , so I analysed my PL/SQL and saw that problem occurs in "TO_NUMBER" function. (if i remove it exception does not occur)

However, same report works fine in another machine with the same data (same oracle version).

What can be the problem? What is the dependence?

Thanks in advance

Elshan


p.s. I have attached the exception

Comments

  • gpigpi
    edited 11:51AM
    Check Oracle provider's version on both machines
  • serifelsenserifelsen Unknown
    edited 11:51AM
    gpi wrote: »
    Check Oracle provider's version on both machines

    They are same: 11.2.0.2.0
  • gpigpi
    edited 11:51AM
    wrote:
    and saw that problem occurs in "TO_NUMBER" function
    What field type in "TO_NUMBER" function? Is regional settings same?
  • serifelsenserifelsen Unknown
    edited 11:51AM
    gpi wrote: »
    What field type in "TO_NUMBER" function? Is regional settings same?

    It is string which contains number.

    I have changed decimal separator in the PC, still report does not work.
  • serifelsenserifelsen Unknown
    edited 11:51AM
    serifelsen wrote: »

    They are same: 11.2.0.2.0

    how can I set NLS_NUMERIC_CHARACTERS in the session?

    I know that "alter session set NLS_NUMERIC_CHARACTERS=',.' " changes it in SQL command.

    But how to execute this command in Fast Report?
  • edited 11:51AM
    Try do it in a few steps:

    1. Add TfrxADOQuery (or similar that you use) to Data tab; let's say its name will be qrySucces
    2. Insert SQL statemanet alter session set NLS_NUMERIC_CHARACTERS=',.' in this query
    3. Use qrySucces.ExecSQL in your script when your report starts

    Mick
  • serifelsenserifelsen Unknown
    edited 11:51AM
    Mick.pl wrote: »
    Try do it in a few steps:

    1. Add TfrxADOQuery (or similar that you use) to Data tab; let's say its name will be qrySucces
    2. Insert SQL statemanet alter session set NLS_NUMERIC_CHARACTERS=',.' in this query
    3. Use qrySucces.ExecSQL in your script when your report starts

    Mick

    I want to do it in the Fast Report script. Is it possible?
  • edited 11:51AM
    Yes you can write in the FR script

    qrySucces.ExecSQL;

    Put this statement anywhere you need: at DialogPage1OnActivate, BitBtn1OnClik (when user ends the dialog) an so on.

    I've been using only pure FR script for several years and all my anserws here are based on FR script and database engine possibilities.

    Mick
  • serifelsenserifelsen Unknown
    edited 11:51AM
    serifelsen wrote: »
    Hi,

    I have seen that my report throws oracle exception in some machines , so I analysed my PL/SQL and saw that problem occurs in "TO_NUMBER" function. (if i remove it exception does not occur)

    However, same report works fine in another machine with the same data (same oracle version).

    What can be the problem? What is the dependence?

    Thanks in advance

    Elshan


    p.s. I have attached the exception

    Problem solved!!

    Registry under hkey_local_machine\software\oracle\oraClient "NLS_LANG" parameter value should be changed to "AMERICAN_AMERICA.WE8MSWIN1252" in my case. (decimal separator is '.' now)

Leave a Comment