You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Description

This indicates whether the foreign key column has a logical rolename. DATATYPE: Boolean.

Property Type

  • Read-only property

Syntax

Public Property HasLogicalRoleName() As Variant

Example

Sub Main 


Dim MyDiagram As Diagram 
Dim m As Model 
Dim e As Entities 
Dim ent As Entity 
Dim atr As AttributeObj 
  

Set MyDiagram = DiagramManager.ActiveDiagram 
Set m = MyDiagram.ActiveModel 
Set e = m.Entities 
  

For Each ent In e 
For Each atr In ent.Attributes 
atr.LogicalRoleName = ent.EntityName + "_" + atr.AttributeName + "_Role" 
Next atr 
Next ent 


For Each ent In e 
For Each atr In ent.Attributes 
  

If atr.HasLogicalRoleName then 
MsgBox("ENT: " + ent.EntityName + vbCrLf + _ 
"ATTR: " + atr.AttributeName + vbCrLf + _ 
"LogicalRoleName: " + atr.LogicalRoleName) 
End If 
  

Next atr 
Next ent 
  

End Sub 

See Also

  • No labels