API-Classes-Way and xmlDump RecordsOnly
Jochen Kötter
jochen-koetter at gmx.de
Sat Jun 16 01:56:10 CDT 2007
Am 15.06.2007 um 21:22 schrieb valentina-request at lists.macserve.net:
> Hi Jochen,
>
>> oh, sorry, no. Every time when I change the database structure on
>> classes way, my db creates a new one. now I thought, it would be
>> fine, if my db would create a new one to update my db-structure to
>> copy the complete data of all tables from the recent db version into
>> the new one. I hope, my intent is cleare now.
>
> So you have a database with some tables and records.
> AND you use Class Way in V4RB
>
> Then you want change STRUCTURE of DB.
>
> You change your RB classes, and now you need reflect this change in
> the db.
> Right?
>
> For this exits db.SchemaVersion
WOW !! Ingenious! Could this be real?
db = new dbPianoclass
f = GetFolderItem( "pianoclass" )
db.open( f )
db.SchemaVersion = db.SchemaVersion + 1
db.flush
Such an incredible easy way!
If this it is, you should specify this for other newcomers in the
reference document.
In Docu it looks like the db.Schemaversion would be only a possibility,
to read the Versionnumber, which could help to update the structure.
>
> And I think V4RB/Examples/Class_way do have such example
I didn't find it anywhere.
Would you confirm wether this is the right way, please?
Greetings
Jochen Koetter
More information about the Valentina
mailing list