oracle exception in some machines

serifelsenserifelsen Unknown
edited 2:45PM 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 2:45PM
    Check Oracle provider's version on both machines
  • serifelsenserifelsen Unknown
    edited 2:45PM
    gpi wrote: »
    Check Oracle provider's version on both machines

    They are same: 11.2.0.2.0
  • gpigpi
    edited 2:45PM
    wrote:
    and saw that problem occurs in "TO_NUMBER" function
    What field type in "TO_NUMBER" function? Is regional settings same?
  • serifelsenserifelsen Unknown
    edited 2:45PM
    gpi wrote: »
    gpi wrote: »
    and saw that problem occurs in "TO_NUMBER" function
    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 2:45PM
    serifelsen wrote: »
    serifelsen wrote: »
    Check Oracle provider's version on both machines

    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 2:45PM
    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 2:45PM
    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 2:45PM
    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 2:45PM
    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

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.