Results 1 to 7 of 7

Thread: no numeric fields from an oracle DB?

  1. #1

    Thread Starter
    Lively Member WiseGuy's Avatar
    Join Date
    Apr 2002
    Location
    Zierikzee, The Netherlands
    Posts
    98

    no numeric fields from an oracle DB?

    Sorry for posting this twice but I really need an answer 'cause I kinda stuck right now!

    I've noticed that I can't display a numeric field in a datagrid that is coming from an Oracle DB.
    No matter how I try, fully in code or with an AdoDC control. It won't display the nummeric fields.
    I even tried different ODBC controls.
    Anybody have any answers?

    Any help is welcome


    The WiseGuy
    I stuck my head out of the window and got arrested for mooning!

    This Post is sponsored by my PC: PIII900, 512MBDimm/133, Seagate 40GB/7200 ATA100, LiteOn 12x DVD, Lite-On 32x12x40 CDrw, Elsa Geforce2 Ultra 64MB incl tv-out, SoundBlaster Live 1024, Ilyama A702HT Vision Master Pro410 17".
    O/S: Windows XP Professional (dutch)
    Internet: Cable (1Mbit connection)

  2. #2
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343
    Can the returned field from Oracle be converted to another format ? Say text?

    In VB / VBA / Access : Cstr(fieldname) as NewFieldname - Perhaps if that can be done in the Oracle Sql ?

    Vince

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  3. #3

    Thread Starter
    Lively Member WiseGuy's Avatar
    Join Date
    Apr 2002
    Location
    Zierikzee, The Netherlands
    Posts
    98
    What did you mean by converting, did you mean converting in the application or converting in the DB?
    It could be converted in the application if that's neccesary but not in the DB.

    And what exactly did you mean by:
    In VB / VBA / Access : Cstr(fieldname) as NewFieldname - Perhaps if that can be done in the Oracle Sql ?
    WiseGuy
    I stuck my head out of the window and got arrested for mooning!

    This Post is sponsored by my PC: PIII900, 512MBDimm/133, Seagate 40GB/7200 ATA100, LiteOn 12x DVD, Lite-On 32x12x40 CDrw, Elsa Geforce2 Ultra 64MB incl tv-out, SoundBlaster Live 1024, Ilyama A702HT Vision Master Pro410 17".
    O/S: Windows XP Professional (dutch)
    Internet: Cable (1Mbit connection)

  4. #4
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343
    I meant that in Access you can return the fields and convert them if neccessary to other types.

    Table1
    Field1 - Text
    Field2 - Numeric

    Select Field1, Cstr(field2) as TextF2 from Table1


    This should take the numerics and convert them to strings. But I don't know whether Oracle supports this type of conversion. I know Sql Server has other functions built in and I was wondering if there was something similar in Oracle.

    Vince

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  5. #5

    Thread Starter
    Lively Member WiseGuy's Avatar
    Join Date
    Apr 2002
    Location
    Zierikzee, The Netherlands
    Posts
    98
    The solution you applied didn't work for Oracle, too bad.

    anyone?


    Thanks anyway!
    I stuck my head out of the window and got arrested for mooning!

    This Post is sponsored by my PC: PIII900, 512MBDimm/133, Seagate 40GB/7200 ATA100, LiteOn 12x DVD, Lite-On 32x12x40 CDrw, Elsa Geforce2 Ultra 64MB incl tv-out, SoundBlaster Live 1024, Ilyama A702HT Vision Master Pro410 17".
    O/S: Windows XP Professional (dutch)
    Internet: Cable (1Mbit connection)

  6. #6
    jim mcnamara
    Guest
    Code:
    SELECT TO_CHAR(NUMBERFIELD) FROM MYTABLE;

  7. #7

    Thread Starter
    Lively Member WiseGuy's Avatar
    Join Date
    Apr 2002
    Location
    Zierikzee, The Netherlands
    Posts
    98
    Thank you, thank you thank you!!!!

    that really did work!
    I'm very happy with this!


    WiseGuy
    I stuck my head out of the window and got arrested for mooning!

    This Post is sponsored by my PC: PIII900, 512MBDimm/133, Seagate 40GB/7200 ATA100, LiteOn 12x DVD, Lite-On 32x12x40 CDrw, Elsa Geforce2 Ultra 64MB incl tv-out, SoundBlaster Live 1024, Ilyama A702HT Vision Master Pro410 17".
    O/S: Windows XP Professional (dutch)
    Internet: Cable (1Mbit connection)

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