Additional Fields of a Published Database

Navigation:  Interfacer QDV >

Additional Fields of a Published Database

Previous pageReturn to chapter overview

The QDVPublishedDatabases table of a SQL Server Article and Set database can be extended with extra columns:

Description, more explicit than the name, which usually contains a short manufacturer code

Date of edition

 

When selecting the database in QDV7, the description shows in place of the name and the date if any.

 

Code:

 

if not exists(select * from sys.all_columns where (name = 'description' or name = 'db_date') and object_id = object_id('QDVPublishedDatabases')) begin

 alter table dbo.QdvPublishedDatabases

 add description nvarchar(50) not null CONSTRAINT DF_QDVPublishedDatabases_Description DEFAULT '',

 db_date datetime not null CONSTRAINT DF_QDVPublishedDatabases_db_date DEFAULT '1900-01-01'

 

 exec('update QdvPublishedDatabases set description = name')

end