scones
asked on
how to use valuta field in mdb in a DBGrid
I am using Delphi 6 and an MSAccess database with a field 'valuta'. How can I use a DBGrid with a Query and showing the data in the correct format 'valuta'
Now the result is not a correct currency like $ 123.90 but the result is now 123.9 without the dollar sign an without the 0 on the end.
Now the result is not a correct currency like $ 123.90 but the result is now 123.9 without the dollar sign an without the 0 on the end.
change the fieldtype to ftCurrency
ASKER
Comment to ILE:
my regional settings are correct.
Comment to kretzschmar:
It is not possible to change the MSAccess mdb database with the field ftCurrency, because I can only choose the fieldtype valuta.
When I am using a Paradox database than I can use of course the fieldtype Currency.
My question is: is it possible to make a conversion or something like that in SQL or in an other way, so I can use the .mdb database with the correct presentation?
my regional settings are correct.
Comment to kretzschmar:
It is not possible to change the MSAccess mdb database with the field ftCurrency, because I can only choose the fieldtype valuta.
When I am using a Paradox database than I can use of course the fieldtype Currency.
My question is: is it possible to make a conversion or something like that in SQL or in an other way, so I can use the .mdb database with the correct presentation?
well ok,
then it is just an output-problem,
use the onsettext/ongettext-events of the fields
to format the value in the manner you need
see the CurrToStr and strToCurr functions
meikl ;-)
then it is just an output-problem,
use the onsettext/ongettext-events
to format the value in the manner you need
see the CurrToStr and strToCurr functions
meikl ;-)
ASKER
meikl,
yes, it is a output problem in my DBGrid and in DBtext.
I cannot find the onsettext/ongettext-events . Can you explain it to me in an other way?
yes, it is a output problem in my DBGrid and in DBtext.
I cannot find the onsettext/ongettext-events
scones:
This old question needs to be finalized -- accept an answer, split points, or get a refund. For information on your options, please click here-> http:/help/closing.jsp#1
EXPERTS:
Post your closing recommendations! No comment means you don't care.
This old question needs to be finalized -- accept an answer, split points, or get a refund. For information on your options, please click here-> http:/help/closing.jsp#1
EXPERTS:
Post your closing recommendations! No comment means you don't care.
Hi!
No comment has been added lately and this question is therefore classified abandoned.
If asker wishes to close the question, then refer to
https://www.experts-exchange.com/help/closing.jsp
Otherwise, I will leave a recommendation in the Cleanup topic area that this question is:
PAQ'd and pts refunded
Please leave any comments here within the next seven days. It is assumed that any participant not responding to this request is no longer interested in its final disposition.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
...Snehanshu
EE Cleanup Volunteer
P.S.
Meikl, how about completing your answer now for others to see?
No comment has been added lately and this question is therefore classified abandoned.
If asker wishes to close the question, then refer to
https://www.experts-exchange.com/help/closing.jsp
Otherwise, I will leave a recommendation in the Cleanup topic area that this question is:
PAQ'd and pts refunded
Please leave any comments here within the next seven days. It is assumed that any participant not responding to this request is no longer interested in its final disposition.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
...Snehanshu
EE Cleanup Volunteer
P.S.
Meikl, how about completing your answer now for others to see?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
all you need you asign the valuta in your
controlpanel
regionalsetings
then goto tab curency
if u vont to do something vith the delphi comands then
yse this
CurrencyString: string[7];
CurrencyFormat: Byte;
NegCurrFormat: Byte;
ThousandSeparator: Char;
DecimalSeparator: Char;
CurrencyDecimals: Byte;
all of this is in the sysutils;
easy arent: