Toad World® Forums

Script to apply a table property to all entities.


#1

Hi all,

This is my first post in this forum so please forgive any blunders.

I need some pointers for how I could write two scripts

  1. A script that would add “ROWDEPENDENCIES” to every entities’ table property section.

  2. A script that would set every relationship’s referential integrity to ‘CASCADE ON DELETE’

Any help much appreciated.

Regards

David


#2

Hi David,

Please find attached the script.

If you have any questions, please write us back. Thanks.

Regards,

Vladka + Mario
script.txt (1.11 KB)


#3

Awesome thank you.

Is there an object model anywhere that is available in a digestible form (I am not a guru programmer type)


#4

Hi David,

I’m not perfectly sure what you mean. Anyway, possibly you’re asking about our Reference Guide.

  1. Please enable Expert Mode: Select Settings | Options | General | select the Expert Mode checkbox | confirm OK.
  2. Select Help | Reference.

If I’ve misunderstood, please write me back. Thanks.

Regards,

Vladka


#5

Hi Vladka,

The reference guide seems to be very application level.

Searching through I found the property TableProp buried deep in the PEREntityOR* classes. How would you know that you can call that as Entity.TableProp (please remember I am not a hardcore OO programmer)?

Regards

David


#6

Hi,

please have a look at the User Guide, section Customization - Sample. In topic “Access Property Values via Scripting Window” you will find information about how to search or use the Referece Guide document. In general, if you work with physical model, look for PER (Physical Entity Relationhip) and if you work with Oracle, look for OR* classes. (LER is for logical model).

I hope it helps.

Regards,

Vaclav