Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2003
    Posts
    2

    Unanswered: ADO / ODBC / Oracle / NUMERIC problem

    Hi.. i'm an italian developer.

    Consider this scenario:

    - Oracle 9.0.1 on Windows2000 server (english version)
    - Internet Information Server 5

    TABLE EXAMPLE
    -------------------------
    NAME VARCHAR2(10)
    COST NUMERIC(18,6)
    -------------------------

    the table is filled with these records:

    NAME COST
    -------------------------
    UNO 10
    DUE 2000000
    --------------------------


    when i retrieve these values from ADO with an ODBC connection with Oracle Drivers 9.0.16, i use this code:

    (conn1 is connection object)

    set rs = Conn1.Execute("SELECT * FROM EXAMPLE")
    while not rs.eof
    response.write rs("NAME") & " --> " & rs("COST")
    rs.movenext
    wend


    THE RESULT IS SOMETHING UNEXPLAINABLE!!

    UNO ---> 10
    DUE ----> 2


    I've tried to trick ODBC connection string with NLS parameter, but... no result !
    I also tried to trick the session executing ALTER SESSION statement ... no result!
    I tried hundreds of tips... BUT STILL NO RESULT!!!
    ...
    now i need help!!!

    Thank You

  2. #2
    Join Date
    Nov 2002
    Location
    Desk, slightly south of keyboard
    Posts
    697
    Hi Stefano,

    I believe there is no consistency between various manufacturers ODBC drivers, they all seem to approach NLS settings in their own way.

    Some completely ignore the instance NLS parms.
    Some use the instance NLS parms
    Some use the instance NLS and convert it again to your OS locale.

    Other ODBC drivers (usually third party ones) always assume the NLS_NUMERIC_PARAMETERS to be in the UK/US form of '.,' regardless of the session settings.

    This may explain the problem. Try setting your session to these settings and see what happens.

    Also, some client side tools will re-translate your NLS settings into it's own local setting:-) So for instance, when setting my NLS parms in TOAD and selecting, it makes no difference. When doing it in SqlPlus it does.

    Hth
    Bill

  3. #3
    Join Date
    Jun 2003
    Posts
    2

    Problem solved!

    Hi !! thanx for your response...
    i've finally solved the problem!!
    the problem was into the ADO connection string with parameter NUM=NLS.

    days ago i also tried this settings ...but i still had the problem ...
    now i've restarted IIS services and... opla'... it's all OK.
    I think that IIS ... perphaps dued to connection pooling ... was still using old setting .. even if i changed it... so the service restart is needed to use new ODBC connection settings.

    Bye!!

  4. #4
    Join Date
    Nov 2002
    Location
    Desk, slightly south of keyboard
    Posts
    697
    Hi Stefano,

    Glad you fixed it, love your web site! (too much time on my hands today)

    Cheers
    Bill

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •