Results 1 to 6 of 6

Thread: Oracle -> ADO type conversion.

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    3

    Question

    Hi all friends!

    I have a little problem with an application that reads
    data from an oracle DB.

    Here in sweden we uses "," as decimal separator for ie. currency.

    My application collects a number of rows with items and items prices and prints them on an invoice.

    The problem is that ADO strips "," from items prices and thus adding the item value by a hundred times.. ie. "16,22" becomes "1622" in the recordset price field.

    The field in question has adNumeric as data type.

    What must I do to get the "," to stay in place??

    regards,
    Jesper

  2. #2
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    There may be an international setting that needs to be set on the Oracle server (Or the PC running the app). Check Regional settings on your client PC and if your running Oracle server on a NT box, check it there as well.. If you running it on a Unix box you will have to check an Oracle manual.

    Also, when setting up your ODBC DSN, check to see if it is configured to use Regional Settings.
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    monte96_@hotmail.com
    monte96@vbgarage.com


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    3

    Question

    Hi!

    Other programs like Winsql using the same DSN gets the right number format.. It's only my ADO VB project that gets it all wrong..

    Therefore I think that there must be some sort of switch or delimiter setting somewhere that needs to be tuned.

    Regards,
    Jesper

  4. #4
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,539
    monte is right

    there is an international setting that needs to be changed to . so that it will stay..

    i remember changing it from "." to "," and vise versa but i forgot how..

  5. #5

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    3

    Thumbs up

    I'm not saying he is wrong. Just wondering why other applications using the same drivers and same system DSN can retreive the information correctly and VB (ADO) can't.

    I learnt today that by using ' around the fieldname in the sql-query ADO is forced to accept "," as decimal notation. Haven't tried it yet though.

    /jesper


  6. #6
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,539
    easier solution would be to have all those european countries use the DOT instead
    hehhe

Posting Permissions

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



Click Here to Expand Forum to Full Width