ApplyPropertyChanges

Description

Updates the writable properties of the user database with any recent property changes.

Call this method after you have set the properties of the user database to update the corresponding values in the database. If you do not call this method, any recent changes you made to the database will be lost.

Syntax

VBScript


database.ApplyPropertyChanges forceEmpty 

Perl


$database->ApplyPropertyChanges(forceEmpty); 
Identifier
Description
database
A Database object.
forceEmpty
Reserved. Must be False.

For VB, a Variant. This argument is optional. The default value is False.

For Perl, a Boolean. Must be False.

Return value
Returns an empty String if the property changes are valid. Returns a String containing an error message if there are incorrect value changes to the database properties.

Example

VBScript

set adminSession = CreateObject("ClearQuest.AdminSession")

' Create a new database

set db = adminSession.CreateDatabase("newDb")

db.Vendor = AD_SQL_SERVER

db.DatabaseName = "path SQL-Server db file"

db.Desciption = "This is a sample database"

db.Server = "machine name of the server"

db.SetInitialSchemaRev =  "some schema revision"

db.ApplyPropertyChanges 

Perl

# Create a new database object

my($DB);

$DB = $CQAdminSession->CreateDatabase("NEWDB");

# Set some properties

$DB->SetName("NEWDB");

$DB->SetDescription("My Cool Database");

# Set all the physical characteristics...

$DB->SetVendor($CQPerlExt::CQ_SQL_SERVER);

# Store the database in SQL Server, on machine, MySQLServer

$DB->SetServer("MySQLServer");

$DB->SetDatabaseName("CQ_NEWDB");

$DB->SetDBOLogin("CQ_NEWDB_DBO");

$DB->SetDBOPassword("SECRET");

$DB->SetRWLogin("CQ_NEWDB_DBO");

$DB->SetRWPassword("SECRET");

$DB->SetROLogin("CQ_NEWDB_DBO");

$DB->SetROPassword("SECRET");

$DB->SetTimeoutInterval(0);

$DB->SetConnectOptions("");  # Not needed, for SQL Server

# Set the initial schema rev of the user database...

$DB->SetInitialSchemaRev($DesiredSchemaRev);



# Apply the property changes

$DB->ApplyPropertyChanges(0);