Add a field to a table

Ruslan Zasukhin sunshine at public.kherson.ua
Thu Dec 23 09:59:27 CST 2004


On 12/23/04 8:25 AM, "Thierry Nauze" <ohmitou at wanadoo.fr> wrote:

Hi Thierry, 

> Hello,
> 
> I have a base in three files: vdb, dat and ind (under REALBASIC and V4RB 1.x).
> 
> I want to add a field to a table.
> 
> The following method seems to work. Is it correct?
> 
> 
> 1°, With Valentina, I add the field to the end of the table in the file
> base.vdb.
> 
> 2 ° And, in the program, I make also in the concerned table (vBaseObjet).
> 
> My question :
> 
> During an update of my program, can I ask my customers to replace only
> the old file (base.vdb) by the new ?

No.

1) You need write in your app special function

Upgrade_1_2
   dim db as Vdatabase
                
   db.open

   db.TAble("t").CreateField

   db.SchemaVersion = 2

   db.close

end 


2) you should call this function in case db.SchemaVersion = 1.
    yes you should add this check also.



-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------




More information about the Valentina mailing list