Results 1 to 3 of 3

Thread: problems with data of decimal type!

Hybrid View

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2004
    Location
    Lithuania
    Posts
    2

    Question problems with data of decimal type!

    I have read a lot of stuff, but haven't found anything needful! You are my last hope
    So the problem is:
    my database is created by using Access 2000. Some fields have data of decimal type.
    so when i run my program and try to set new records and display them into datagrid I get the error "Data type mismatch in criteria expression".
    I have noticed, that my program don't understand, what a comma is. Simple it is missed then I try to save new records.
    example:
    I set: 565,236
    after saving: 565236

    Everything is OK, when I set Single type instead Decimal type, but I need Decimal type...

    If somebody has any seggetions, please, let me know!

  2. #2
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263
    COMMA in the THOUSANDS position is a formatting character - it should not be stored in the DB or sent to the DB for storage. It is not a number with a "COMMA" in the thousands position.

    BTW - not sure what you meant by SINGLE type - but you should not convert DECIMAL DB types to SINGLE (floating point) - try currency datatype, maybe...

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2004
    Location
    Lithuania
    Posts
    2
    I think now I understand my problem.
    In my country the decimal separator is a comma (,) and in most country the decimal separator is a point (.).
    So when I changed (Contral Panel/Regional and Language settings) Standarts and Formats to English, then the problem disappeared...

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