[V4RB] Class way, Decimals // Report #0003911 sample project

Stan Busk maxprog at mac.com
Tue Jan 20 10:23:39 CST 2009


Hi,

By the way, I have a last question for you. Why isn't it possible to  
set the precision and scale of a double property in a table constructor?

Right now the VDouble constructor is:
VDouble( inName as String, inFlags as Integer = fNone, inMethod as  
String = "" )

How can you set the precision and scale? Running an ALTER TABLE query  
after creating the table?

Stan

> On 1/18/09 3:35 PM, "Ivan Smahin" <ivan_smahin at paradigmasoft.com>  
> wrote:
>
> Hi Stan,
> Hi All,
>
> Yes, you need check example with SchemaVersion for Class_way fodler  
> of V4RB
> examples.
>
> After you did
>    MyDatabase.Open()
>
> Using Class way you should not ALTER schema.
> IF you have more questions please let us know.
>
>
>> Ok. there is predictable behavior.
>>
>> Look, you get the pointer to the field first.
>> Now you do Alter table to make some changes to that field. Internally
>> it goes like drop old field and create new one with copying data.
>> Anyway old field pointer is not valid anymore. V4RB contains "guards"
>> for null kernel objects and getValue() methods returns just 0.00.
>>
>> 1. You should fix your "static-way" schema (set of classes
>> representing db structure) if required.
>>
>> 2. You should use "db.SchemaVersion" trick. (See examples for  
>> details)
>> In short you open database in "normal" mode - without involving your
>> classes. Then ask db for SchemaVersion first - if it is 0 you have to
>> make some changes - so you do that alter and finally set  
>> SchemaVersion
>> to 1. So you do this one time for particular db.
>>
>> I'm not sure but I think it is possible to get SchemaVersion even
>> without db.Open.
>>
>> 3. And finally open db in usual way.
>
> -- 
> Best regards,
>
> Ruslan Zasukhin
> VP Engineering and New Technology
> Paradigma Software, Inc
>
> Valentina - Joining Worlds of Information
> http://www.paradigmasoft.com
>
> [I feel the need: the need for speed]
>
>



More information about the Valentina mailing list