Add a field to a table

Thierry Nauze ohmitou at wanadoo.fr
Thu Dec 23 12:14:28 CST 2004


sunshine at public.kherson.ua a écrit le 23/12/04 :

>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.
>
OK

Thanks

-- 
Thierry Nauze               Saint-Denis de la Réunion




More information about the Valentina mailing list