Changes from 1.x to 2.0 // v5

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Feb 11 10:29:23 CST 2005


---------------------------------------------------
* remove ValentinaUtility methods

* V4RB 2.0 have enums with names EVxxx for constants.

* Find/replace a bunch more kv_ constants with the EV... enumerator
equivalents.  Most of the ones you need to find will be in the EVFlag
domain, but also some in other places like EVOnDeletion domain.
Compiler will tell you which ones you need to replace since you just
threw out ValentinaUtilities.

* IF you have use in the old project NOT kV_constants, but just NUMERIC
values of constants then you must find all such places and replace on new
Evxxxx constants. This is very very important because 2.0 can have other
numeric values for constants.


* V4RB 2.0 supports a new style of errors via VException class.
    if you convert old 1.x project then you have to use db.LastError style.
    you can disable new style and return back old style.
    use for this Valentina.ThrowExceptions as boolean

* Global methods are collected in the MODULE "Valentina",
    so now

    ValentinaInit()         => Valentina.Init()
    ValentinaShutDown       => Valentina.ShutDown()
    ValentinaEscapeString   => Valentina.EscapeString()
    ValentinaDebugOn        => Valentina.DebugLevel property
    ...

* Valentina.Init() doesn't return a value anymore. Use the CacheSize
properties to check if the database was properly initiated.

* if in the 1.x version you have set some encoding for strings BEFORE/AFTER
send strings to V4RB then now you no need to do this.
Although for now V4RB 2.0 expect to get UTF8 strings -- default encoding of
V4RB


* Dcon and DbgView support depricated.

    instead we have now V4RB_LOG.txt file that get output from V4RB.

    It is very recommended during development set
        Valentina.DebugLevel = EVDebugLevel.kLogParams.
    then in case of any problems you can open V4RB_Log.txt file
    and monitor a lots of useful information.


------------------------------------------
Database:
------------------------------------------

* Vdatabase.Open() / .Create() no longer return anything, so
change code to reflect. Use Database.ErrNumber to check errors.


------------------------------------------
Tables:
------------------------------------------

* class VBaseObject  renamed to  Vtable.
    so you need reset the super-class for all your Table classes.


* The GotoRecID() no longer exists. Use RecID and RecordExists() :

       If RecordExists(myRec) then
           RecID = inRec
       end if

* The AddRecord() function now returns the new record value.


------------------------------------------
Fields:
------------------------------------------

* Property BaseObject of class VField changed to property Table, a
careful find/replace should fix.


* VField.Nullable to VField.IsNullable find replace.
* VField.Compressed to VField.IsCompressed find replace.
* VField.Indexed to VField.IsIndexed find replace.
* VField.Unique to VField.IsUnique find replace.

* Vfield.SetMethod()  no longer exists.

    instead you should on creation of a field provide the method formula
    into the constructor of field via last parameter.

    IF you want change existed method, then use
    Vfield.MethodText property

* property Language for Vstring/VarChar/Text removed.
   also it not exists any more in the constructors of this classes.

    instead Vdatabse, Vtable and Vfield now have trio
  
      .Locale
      .CollatioAttribute
      .StorageEncoding


------------------------------------------
Cursors:
------------------------------------------

* Vcursor.SqlString property not exists any more.

* VCursor.CurrentPosition to VCursor.Position find replace


------------------------------------------
SQL:
------------------------------------------

* 2.0 SQL do NOT allow you name or tables with key words of SQL.
    for example field with name "references" will not work in SQL.
    or field with name "default".

    recommendation is always use some prefix for table/field names.
    e.g. tblPerson, fldName

* LIKE operator now works not as regex but as SQL92 LIKE.
    if you need regex then use REGEX keyword



-- 
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-beta mailing list