Recent

Author Topic: Editing db-fields with decimals  (Read 3947 times)

JanH

  • Guest
Editing db-fields with decimals
« on: April 06, 2006, 12:59:19 pm »
Hi there,

I want to use a currency field in my firebird 1.5 database. Its type is decimal(15,2).
The content of the field is shown correct but editing is not possible (language of system is german!). Every change I take is lost after a post and the old value is shown.
I think it's a conflict between german decimal format (123,45) and the english one ( 123.45).

Has someone an idea how i can solve it - excepting the possibility of create an update statement after posting the dataset? Because I want also to insert a new dataset with any decimal values, and how should i update a record without a primary key?

Hope you understand my english ... and problem ;-)

...regards...

JanH

  • Guest
RE: Editing db-fields with decimals
« Reply #1 on: April 10, 2006, 12:27:40 pm »
no one seems to have a solution...

now I have changed the field type into integer and multiply the entered value with 100

barko

  • New Member
  • *
  • Posts: 45
RE: Editing db-fields with decimals
« Reply #2 on: April 10, 2006, 08:42:56 pm »
I do this in my programs (slovenian language, same decimal format as yours):
Code: [Select]

--cut--
initialization
   DecimalSeparator:=',';
   ThousandSeparator:='.';
--cut--


In objectinspector (for dbgrid) columns I set
Code: [Select]

DisplayFormat:='###,##0.00';

 

TinyPortal © 2005-2018