Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

how to use valuta field in mdb in a DBGrid

Posted on 2003-03-02
8
Medium Priority
?
252 Views
Last Modified: 2010-04-04
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.
0
Comment
Question by:scones
8 Comments
 
LVL 3

Expert Comment

by:ILE
ID: 8054113

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:




0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 8055346
change the fieldtype to ftCurrency
0
 

Author Comment

by:scones
ID: 8056775
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?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 27

Expert Comment

by:kretzschmar
ID: 8057111
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 ;-)

0
 

Author Comment

by:scones
ID: 8060001
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?
0
 

Expert Comment

by:CleanupPing
ID: 9316979
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.
0
 
LVL 5

Expert Comment

by:snehanshu
ID: 9999610
Hi!
No comment has been added lately and this question is therefore classified abandoned.

If asker wishes to close the question, then refer to
http://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?
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 10029539
PAQed, with points refunded (100)

Computer101
E-E Admin
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question