Page 1 of 1

Currency field data not displaying properly

Posted: Fri 09 Mar 2007 13:42
by Japhar
Hi,

I have created a new project where i have one MSConnection, MSQuery, Datasource, DBText field and one button on my screen.

MSQuery: select 0.00 as total from salary
added total to persistance field and Readonly property of total is set to False.

Note: Here total column will not available in salary table. I'm just retriving 0.00 and data i will manipulate from the code.

DBText field: attached Datasource and DataField as 'total'

Now on click of the button, i have written below code:

MSQuery.Close;
MSQuery.Open;
MSQuery.edit;
MSQuery.FieldByName('total').AsCurrency := 1000.00;

Once the above code is executed it is showing '1E3' instead of $1000.00
If i assign below 100 to total column then it shows properly.

Why this inconsistency? Please suggest me how to proceed???

FYI: This is one of my requiement in my migration code from IDAC to SDAC.

Posted: Mon 12 Mar 2007 08:57
by Jackson
Please modify your query as the following and try again:

Code: Select all

select CAST(0.00 as money) as total from salary

Posted: Mon 12 Mar 2007 15:03
by Japhar
Great...It works...thanks a lot...