Number encoding in JET database

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Søren Reinke

    Number encoding in JET database

    Hi there

    I am working on a little dive logbook manager in C#, and have a little
    problem with getting data into a JET database.

    When importing a CSV file i fill a Dataset with data from the CSV file, i
    can see in the debugger that a number is represented as '6.7' in a variable
    of the type Decimal.
    But after it has been stored in the JET database it is now '67' instead of
    '6.7' :-(

    I had the same problem when trying to import the CSV file, but solved it byt
    setting the program's defualt encoding to 'en-US'.

    How to do the same with the JET database ?

    Ah another thing, when using a StreamReader how do i when i open the file
    specify which encoding like 'en-US' i want to use ?

    p.s. My computer is setup to use danish numbers where '6.7' would be '6,7'
    instead, and i guess this is the main problem.

    Best regards
    Søren Reinke


  • Søren Reinke

    #2
    Re: Number encoding in JET database

    Can't anyone help ?

    Best regards
    Søren Reinke

    "Søren Reinke" <soren@reinke.f jernmig.dk> wrote in message
    news:d5furl$imv $1@newsbin.cybe rcity.dk...[color=blue]
    > Hi there
    >
    > I am working on a little dive logbook manager in C#, and have a little
    > problem with getting data into a JET database.
    >
    > When importing a CSV file i fill a Dataset with data from the CSV file, i
    > can see in the debugger that a number is represented as '6.7' in a
    > variable of the type Decimal.
    > But after it has been stored in the JET database it is now '67' instead of
    > '6.7' :-(
    >
    > I had the same problem when trying to import the CSV file, but solved it
    > byt setting the program's defualt encoding to 'en-US'.
    >
    > How to do the same with the JET database ?
    >
    > Ah another thing, when using a StreamReader how do i when i open the file
    > specify which encoding like 'en-US' i want to use ?
    >
    > p.s. My computer is setup to use danish numbers where '6.7' would be '6,7'
    > instead, and i guess this is the main problem.
    >
    > Best regards
    > Søren Reinke
    >
    >[/color]


    Comment

    Working...