?
Solved

how to use valuta field in mdb in a DBGrid

Posted on 2003-03-02
8
Medium Priority
?
251 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month14 days, 12 hours left to enroll

770 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