Modifying an existing database

Barney barney at custombased.com
Wed Jan 19 08:14:50 CST 2005


Gary,

Just use a bit of code like his.

  dim res as boolean
  Dim DB as vdatabase
  Dim BO as VBaseObject
  Dim fld as Vfield
  
  
  BO = App.Db.BaseObject("JobLineItems")
  Fld = Bo.Field("DesignersFee")
  If Fld <> Nil then
    msgBox "Altering 'Designers Fee' field now."
   // fld = BO.createfield( "DesignersFee", 8) //VFloats
    Fld.Type = //Whatever type your field needs to be changed to.
  End if

In my experience all data in this field is left in tact. It might pay to
back up first just to try it though.

Barney




on 18/1/05 1:56 PM, Gary Edge at valentina at panamind.com wrote:

> I've done this in a previous app but can't find reference to it in the
> docs. (Actually I'm being a little lazy).
> 
> I have an existing db with 10,000+ records and I need to change a short
> field to a long field. I tried to do this with VAPP but it crashed
> (possibly do to the db being encrypted?).
> 
> Anyway I know this can be done on the fly to update older databases but
> don't remember how.
> --
> 
> Best Regards,
> Gary
> 
> --
> 
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
> 



More information about the Valentina mailing list