class way in Realbasic
Ruslan Zasukhin
ruslan_zasukhin at valentina-db.com
Fri Nov 18 14:15:08 CST 2011
On 11/18/11 9:18 PM, "Paxdo Presse" <paxdo at mac.com> wrote:
>
>
> Hi,
>
> If we use the class way (REALbasic),
> I feel you can not upgrade an existing database (add a new table for example).
>
> Apparently, Valentina does more then open the data file. Right?
Right,
But you can upgrade schema of course and we have example of this
Hmm. ... Where it is
And Example Guide do not have it ...
http://www.valentina-db.com/dokuwiki/doku.php?id=valentina:products:adk:exam
ples:guide:guide
Strange...
May be in docs was pointed ...
Steps are:
1) when you start to have few versions of db schema
You should use
db.SchemaVersion property
2) So you check
if ( db.SchemaVersion =1 )
Convert_1_2()
if ( db.SchemaVersion = 2 )
Convert_2_3()
3) in Convert methods, you open db NOT as
MyDatabase , but just as VDatabase.
And just change db as you need using SQL or API.
Up to you.
Then you close this Vdatabase object and open it as MyDatabase class
--
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