Icon View Thread

The following is the text of the current message along with any replies.
Messages 31 to 39 of 39 total
Thread Currency fields in EDB.
Tue, Apr 1 2008 7:50 AMPermanent Link

Abdulaziz Jasser
Tim,
Roy,

In otherwords, how to solve the "OnCalcsFields" error when the field is going to be created during run-time using SQL (CREATE TABLE...)?  In
DBISAM we normally create them in design-time so we don't get them.
Tue, Apr 1 2008 8:25 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Abdulaziz


Can you show the sql you're using, and what is the error you're getting?

Roy Lambert [Team Elevate]
Tue, Apr 1 2008 11:57 AMPermanent Link

Abdulaziz Jasser
Roy,

<<Can you show the sql you're using, and what is the error you're getting?>>

I am not getting an error when a creating a memory table.  The error is getting from the "OnCalcFields" event since I am using one of those
fields in the event.  This field is visible in run-time.
Tue, Apr 1 2008 12:07 PMPermanent Link

Abdulaziz Jasser
Roy,

The scenario is like this:

1- I create a memory table in run-time using CREATE TABLE clause.
2- Then in run-time also I open this table using a TEDBTable component.  This component has "OnCalcFields" event which uses one of the
fields in the memory table.  I get an error saying "This field does not exists" unless I create the same field in design-time like the old DBISAM
days.  If create the field in design-time as FLOAT type the I got another error about different types between the field type in the SQL
(DECIAML) and the field type in FLOAT in design-time.  I hope this will make things clear to you.
Tue, Apr 1 2008 1:49 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Abdulaziz

>1- I create a memory table in run-time using CREATE TABLE clause.
>2- Then in run-time also I open this table using a TEDBTable component. This component has "OnCalcFields" event which uses one of the
>fields in the memory table. I get an error saying "This field does not exists" unless I create the same field in design-time like the old DBISAM
>days. If create the field in design-time as FLOAT type the I got another error about different types between the field type in the SQL
>(DECIAML) and the field type in FLOAT in design-time. I hope this will make things clear to you.

Tim can probably answer this one quicker since I will need to go and try it. However, two more questions, are there any other fields that have been designed as persistent fields at design or run time? Also is the memory table defined and opened before you open the other table.

As far as the other error is concerned I would expect an error message when you have a field defined as DECIMAL in a table and then try to create a persistent field as FLOAT. This is normal and its nothing to do with ElevateDB.

Roy Lambert [Team Elevate]
Tue, Apr 1 2008 5:26 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Abdulaziz,

<< The question: what type should I use when defining this field as
aggregate field to make it compatible with DECIMAL type? >>

Same as with DBISAM - the TBCDField field component.

--
Tim Young
Elevate Software
www.elevatesoft.com

Tue, Apr 1 2008 6:03 PMPermanent Link

Abdulaziz Jasser
Roy,

I have to admit that we lost the currency field.  It is such a big lost.  However, I can reformat things again (Pain).  I never gave the ANSI
things a big attention.  A currency type that needs to be respected by everyone (ALL Operating Systems) wasn't a hard thing!


<<Tim can probably answer this one quicker since I will need to go and try it.>>

Both of you guys are doing rightSmile


<<However, two more questions, are there any other fields that have been designed as persistent fields at design or run time?>>

No, only one calculated field (Price x Quantity).  The price is the problem.  It used to be a currency field.


<<Also is the memory table defined and opened before you open the other table.>>

There are no other tables, no lookup-tables, no nothing.  Just a pure memory table that need to be moved to the physical DB when everything
is validated.

<<As far as the other error is concerned I would expect an error message when you have a field defined as DECIMAL in a table and then try
to create a persistent field as FLOAT. This is normal and its nothing to do with ElevateDB.>>

This is one problem that I am facing.  I will use a float type for more compatibility, and then I will reformat things the way I want.
Tue, Apr 1 2008 6:08 PMPermanent Link

Abdulaziz Jasser
Roy,

EDB migrated the currency field to float.  I will stick to this type for compatibility.
Wed, Apr 2 2008 2:26 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Abdulaziz

>EDB migrated the currency field to float. I will stick to this type for compatibility.

Just be prepared for rounding problems.

Roy Lambert [Team Elevate]
« Previous PagePage 4 of 4
Jump to Page:  1 2 3 4
Image