Chapter 4 Managing Profiles


Computed

When an extended attribute is computed, it is calculated from other values using Get and/or Set VBScript methods.

The computed extended attribute can have the following access types:

Note that a Set method cannot be defined without a Get method.

The computed extended attribute is not saved in the model. When selected, this checkbox triggers the display of the following additional property pages:

Additional tab Description
Get Method Script Specifies the body of the Get method, which returns the value of the extended attribute.
Set Method Script Specifies the body of the Set method, which sets the value of the extended attribute.
Global Script Specifies functions and static attributes that may be reused among different functions.

Example

In the following script, the FileGroup computed extended attribute gets and sets its value from the physical options of the table object:

Function %Get%(obj)
%Get% = obj.GetPhysicalOptionValue("on/<filegroup>")
End Function

Sub %Set%(obj, value)
obj.SetPhysicalOptionValue "on/<filegroup>", value
End Sub

 


Copyright (C) 2006. Sybase Inc. All rights reserved.