Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread get and set version of database
Sat, Oct 20 2012 5:24 AMPermanent Link

Torben Laursen

Hi,

How do i read and set the version of the active elevatedb database that I have in use?

Regards Torben
Sat, Oct 20 2012 9:55 AMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Torben,

Databases don't have a Version attribute.
Tables, Views, Procedures and Functions as well as Jobs do have a Version property but not databases.
If you need to store version information for your databases you might perhaps use the 'Attributes' or 'Description'.
For example:
  CREATE DATABASE "MyDatabase"
    PATH 'c:\MyData'
    ATTRIBUTES 'Version=1.00'

or, if you use it only for the version information:
  CREATE DATABASE "MyDatabase"
    PATH 'c:\MyData'
    ATTRIBUTES '1.00'

and then retrieve it from the Configuration.Databases table:
  SELECT
    Attributes
  FROM
    Configuration.databases
  WHERE
    Name = 'MyDatabase'

-
Fernando Dias
[Team Elevate]
Sat, Oct 20 2012 11:19 AMPermanent Link

Torben Laursen

I can just set to version on a table if that is directly supported.

how do I set/read the version of a excisting table?

Regards Torben
Sat, Oct 20 2012 11:41 AMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Torben,

Yes, that is supported, for example:
  ALTER TABLE MyTable VERSION 2.00
  CREATE TABLE MyTable ("OneColumn" INTEGER) VERSION 1.00

You can then read it from the Information.Tables table :
  SELECT Version FROM Information.Tables WHERE Name = 'MyTable' ;

--
Fernando Dias
[Team Elevate]
Image