Automatic Data Entry

Peter De Berdt peter.de.berdt at pandora.be
Thu Oct 28 09:22:58 CDT 2004


On 28 Oct 2004, at 08:59, Ruslan Zasukhin wrote:

> On 10/28/04 9:30 AM, "Peter De Berdt" <peter.de.berdt at pandora.be> 
> wrote:
>
>> On 27 Oct 2004, at 17:23, Ruslan Zasukhin wrote:
>>
>>> On 10/27/04 4:44 PM, "Peter De Berdt" <peter.de.berdt at pandora.be>
>>> wrote:
>>>
>>>> Ruslan, is the database now automatically adding fields if the
>>>> object-structure is changed (instead of having to open the valentina
>>>> db
>>>> as a generic database, altering the structure and then initializing
>>>> the
>>>> subclass)?
>>>
>>> You mean in 2.0 ?
>>>
>>> No Peter.
>>>
>> That's a pity. Seeing so many Filemaker developers switching to other
>> databases, this in one of the features that could have made Valentina
>> stand out (because now it just crashes if the class structure doesn't
>> match the database structure and you try to access a non-available
>> field).
>
> In 2.0 we have add special error codes as
>
>     FieldNotInTable
>     FieldNotInClass
>
> Deal is that REALbasic code is REALbasic code,
> And Valentina's kernel is RB code.
>
> I do not see way EXACTLY and explicitly map changes in RB code
>     to STEPS of modification in db structure.
>
> If you think this is easy then let's try formulate this rules together.
> May be we did not think deeply.
>
I don't know how the Valentina plug-in handles things (and I don't have 
a problem with maintaining a correct database structure myself, my 
classes handle this), but let me give you an example:

SchemaVersion 1
MyVDatabase
     -> MyBaseObject1
         • MyField1 as VVarchar
         • MyField2 as VULong
         • MyField3 as VDouble

SchemaVersion 2
MyVDatabase
     -> MyBaseObject1
         • MyField1 as VVarchar
         • MyField2 as VLong
         • MyField3 as VDouble
         • MyField4 as VString

What you have to do now, is before creating an instance of MyVDatabase, 
open up that database as a generic VDatabase, then create the new 
field, alter the type of MyField2, then close the database again, 
instantiate a MyVDatabase and then start working with your database.

If the Valentina plug-in would somehow be able to reflect the changes 
in the class structure to the database structure, it would save a lot 
of people time and would stay closer to the Filemaker paradigm of being 
able to change the database structure instantly.

Best regards

Peter De Berdt


More information about the Valentina mailing list