Persistent field mapping during design time
Posted: Thu 19 Feb 2009 10:32
Hi,
I want to migrate a BDE project to ODAC using the migration wizard. The wizard leaves all persistent fields as the were before (TIntegerField, TSmallintField, TFloatField, ...).
So, I have to set the following constants, in order to get no runtime errors during opening the datasets (I set them by overwriting the datamodules constructor):
And the Session Options:
Untils this point all works as expected.
But during design time, the constants have their default values, so if I add persistent fields to the dataset using the fields editor, they have the wrong datatypes. For example:
==> TIntegerField (I want TSmallintField, 16 bit)
==> TLargeIntField (I want TIntegerField, 32 bit)
==> TFloatField (I want TLargeIntField, 64 bit)
I dont want to add all fields manually, so how do I set the OraClasses constants in order to have during design time the same behaviour as during run time?
Regards
skiller
I want to migrate a BDE project to ODAC using the migration wizard. The wizard leaves all persistent fields as the were before (TIntegerField, TSmallintField, TFloatField, ...).
So, I have to set the following constants, in order to get no runtime errors during opening the datasets (I set them by overwriting the datamodules constructor):
Code: Select all
SmallintPrecision := 5; // until NUMBER(5,0) ==> TSmallIntField
IntegerPrecision := 10; // until NUMBER(10,0) ==> TIntegerField
LargeIntPrecision := 20; // until NUMBER(20,0) ==> TLargeIntFieldCode: Select all
Session.EnableIntegers = true
Session.EnableLargeint = true
Session.EnableNumbers = false
But during design time, the constants have their default values, so if I add persistent fields to the dataset using the fields editor, they have the wrong datatypes. For example:
Code: Select all
Number(5,0)Code: Select all
Number(10,0)Code: Select all
Number(20,0)I dont want to add all fields manually, so how do I set the OraClasses constants in order to have during design time the same behaviour as during run time?
Regards
skiller