Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 39 total
Thread Currency fields in EDB.
Wed, Mar 26 2008 8:57 AMPermanent Link

Abdulaziz Jasser
Hi,
I DBISAM there use to be a Currency field type which respect the Delphi's predefined variables (Windows regional settings) like:

CurrencyString, CurrencyDecimals, and ThousandSeparator.  How to implement that with EDB?  In other words, what field type should I use to
force that field to respect those variables?  Since nobody asked this question before I would expect the answer to be very simple but never
lucky to figure it out myselfSmile
Wed, Mar 26 2008 11:11 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Abdulaziz,

<< How to implement that with EDB? >>

Same way - nothing has changed in EDB with respect to how the Delphi TField
components are edited and/or displayed.

--
Tim Young
Elevate Software
www.elevatesoft.com

Wed, Mar 26 2008 11:49 AMPermanent Link

Abdulaziz Jasser
Tim,

<<Same way - nothing has changed in EDB with respect to how the Delphi TField
components are edited and/or displayed.>>

What do you mean?  After migrating a DBISAM3 to EDB database all the currency fields became FLOAT and they don't respect the currency
settings any more!
Wed, Mar 26 2008 11:57 AMPermanent Link

Abdulaziz Jasser
Tim,

Let me rephrase my question again.  How to make a currency field in a memory table that is created during run-time (CREATE TABLE...)?
Wed, Mar 26 2008 12:25 PMPermanent Link

Uli Becker
Abdulaziz,

the difference is just the formatting of the edit-field or whatever you
use to display the currency value.
If you add the fields to a TEDBTable component e.g., you can set the
property "DisplayFormat" to

,0.00 ¤

That will format the float value properly.

Regards Uli
Wed, Mar 26 2008 12:28 PMPermanent Link

Abdulaziz Jasser
Uli

<<the difference is just the formatting of the edit-field or whatever you
use to display the currency value.
If you add the fields to a TEDBTable component e.g., you can set the
property "DisplayFormat" to>>

Thanks for the reply.  However, what if the field is connected to a component?
Wed, Mar 26 2008 2:28 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Abdulaziz


Something like

CREATE TABLE xxx ADD COLUMN Money DECIMAL(20,4)
or
CREATE TABLE xxx ADD COLUMN Money DECIMAL(20,2)

Roy Lambert [Team Elevate]
Wed, Mar 26 2008 2:34 PMPermanent Link

Abdulaziz Jasser
Roy,


<<Something like

CREATE TABLE xxx ADD COLUMN Money DECIMAL(20,4)
or
CREATE TABLE xxx ADD COLUMN Money DECIMAL(20,2)>>

Now this works fine.  It was much easier with DBISAM.  But at least this will solve the issue.  Big thanks to you.  
Wed, Mar 26 2008 2:49 PMPermanent Link

Abdulaziz Jasser
Roy,

Money is not a field type in EDB.  You probably mean:

CREATE TABLE xxx ADD COLUMN Float DECIMAL(20,4);

Aren't you?
Wed, Mar 26 2008 3:22 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Abdulaziz


I used Money as the field name DECIMAL is the type.

I'd really recommend against using column types as column names which is what you'd do with your example.

Roy Lambert [Team Elevate]
Page 1 of 4Next Page »
Jump to Page:  1 2 3 4
Image