I want to have the DDL script created enter a record into a table so we know what version the database is. Is is possible to access the value of Model Properties.version in the After Script?
Thanks in advance
I want to have the DDL script created enter a record into a table so we know what version the database is. Is is possible to access the value of Model Properties.version in the After Script?
Thanks in advance
Hello there,
Before we dig deep into the topic, let me ask you a few questions:
Are you planning you use Model After Script, or the particular Entity After Script for executing the INSERT statement? And by version you mean the Version property that is shown in Model Properties dialog?
One way or another, by default you cannot access the Model Version property in After Script. There is a way to do that using customization, but I would like to know the specifics of your situation first.
Regards,
Lukas
Hi, thanks for the reply
yes, I want to use the Model After script to generate an insert statement containing the version of the model property.
Alright, as I stated before, this requires some customization. Try doing the following:
What you have basically done is that you have created your own custom Application Variable. You should be now able to write your INSERT statement using this Variable.
Regards,
Lukas
Super thanks! I’ll try this out!
I’m missing something, When I go through all these steps and try to generate the DDL script, it returns the message below
Error
Source: Microsoft JScript runtime error
Script: PERModel
Description: ‘Model’ is undefined
Row: 3
Column: 2
Callstack:
“FmPERGenerator” from package “Physical Entity Relationship Model”
“PERCodeGeneratorExt” from package “Generations for PER Model”
“PERModel” from package “Model Version Property”
OK
Any ideas what this might be? I’ve run through the steps a few times.
Oh, I'm sorry, it's supposed to be "return ModelTitle.Version;" in the script. I got this error as well and while I fixed it in my script I forgot to change it in the screenshot.
Amazing! Thanks a lot, this works perfectly
Thanks for the detailed demo, I never had a clue I could do anything like this inside TDM.
On Wed, Nov 26, 2014 at 10:18 AM, Lukas Knapek bounce-LukasKnapek@toadworld.com wrote:
Reply by Lukas Knapek
Oh, I'm sorry, it's supposed to be "return ModelTitle.Version" in the script. I got this error as well and while I fixed it in my script I forgot to change it in the screenshot.
To reply, please reply-all to this email.
Stop receiving emails on this subject.
Or Unsubscribe from Toad Data Modeler - General notifications altogether.
Toad Data Modeler - Discussion Forum
Flag this post as spam/abuse.