Title: Updating a datamodel via rose script

Hello

   Does anyone know how I can update column attribute values in a datamodel via a rose script. I initially started using the code below to isolate the columns, but I can not find any way to update the value. I need to double the currently defined size for all NVARCHAR and NCHAR columns in my model.

Rose Version 2001.03.00

Sample code used to locate columns:
        Dim iClass As Integer
        For iClass = 1 To TargetClasses.Count
            Set theClass = TargetClasses.GetAt(iClass)
                If theClass.StereoType = "Table" Then
       
                        For i = 1 To theClass.Attributes.Count
                                Set anAttribute = theClass.Attributes.GetAt(i)
                                strColumnType = anAttribute.Type
                                If instr(strColumnType, "NVARCHAR") > 0 _
                                   Or instr(strColumnType, "NCHAR") > 0 Then
                                        Set objProperty = anAttribute.GetRoseItem()

                                        strLen = propertyValue (anAttribute.GetRoseItem(), kLength)
                                        strColumnType = strColumnType & "(" & strLen & ")"
                                        Print "Column: " + strColumnType + " " + strLen              
                                End If
                        Next i
                End If
        Next iClass


Thanks in advance

Robert Mcilvaine
Supply Chain Services
Powerway, Inc
Email - [EMAIL PROTECTED]
Web  - www.powerwayinc.com

MESSAGE IS INTENDED ONLY FOR THE USE OF THE INDIVIDUAL OR ENTITY TO WHICH IT IS ADDRESSED AND MAY CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM DISCLOSURE. If the reader of this message is not the recipient or an employee or agent responsible  for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited.  If you have received this communication in error, please notify the sender immediately by E-Mail and return the original message to the sender.  Thank you.

Reply via email to