Suppose I have a table
EMP (EMP_ID,EMP_NAME)
Then I create llblgen project and generate .lgp file
Then EMP table changed physically in DB to Employee(ID,Name)
Now, I want to be able to open .lgp file and change the DB Names (Target Names) programmatically
(depend on desinger schema Refreshing will not be good in a massive db renaming which is our case)
i try this,
Dim project As ApplicationCore.Project
Dim entity As ApplicationCore.Entities.EntityDefinition
Dim field As ApplicationCore.Entities.EntityFieldDefinition
project = ApplicationCore.Project.Load("C:\Test.lgp")
For Each entity In pro.Entities
For Each field In entity.Fields
field.TargetName = GetNewFieldName(entity.Name, field.FieldName)
Next
entity.TargetName = GetNewEntityName(entity.Name)
Next
Project.Save
The problem is that field.TargetName and Entity.TargetName is ReadOnly
How can I change the names programmatically? What is the interface the designer use to change these name when refreshing schema?
Thanks.