costabas
Follow / 10 Jan 2018 at 8:20pm / Toad Data Modeler
Latest post by on 12 Jan 2018 at 8:49pm

The syntax highlighter in the SQL Preview doesn't highlight properly...

Expand content
Hi: I added a table comment that has multiple lines (I pressed enter to create new lines). When I go to SQL Preview, I noticed that the syntax highlighter didn't highlight the all the sql string...

Hi:

I added a table comment that has multiple lines (I pressed enter to create new lines). When I go to SQL Preview, I noticed that the syntax highlighter didn't highlight the all the sql string lines.

The RDBMS is SQL Server 2008 R2.

Here is a screenshot. Lines 58 and 60 should have been blue.

It's not  a big issue, but when I looked the comment the first time I thought I did something wrong, then I realized the the syntax highlighter didn't highlight properly the strings.

205 2 / Create an account to join the discussion.
costabas
Follow / 3 Jan 2018 at 10:58pm / Toad Data Modeler
Latest post by on 10 Jan 2018 at 6:47am

Dialogs don't show up immediately

Expand content
Hello, This is a complaint I've had for a very long time, since the days TDM was owned by the Czech company (the product had another name). I bring it up again because it annoys me greatly and...

Hello,

This is a complaint I've had for a very long time, since the days TDM was owned by the Czech company (the product had another name).

I bring it up again because it annoys me greatly and perhaps you can do something about it.

It takes a few good seconds until a dialog shows up after clicking on an entity or attribute.

Let's say I want to edit the attributes of an entity. I double-click on the entity. It takes 3 seconds until the Entity Properties dialog shows up.

Now, I go to attributes and double-click on an attribute. It takes 3 seconds until the Attribute Properties dialog shows up.

Let's say I want to modify a check constraint. I double-click on a check constraint. This one is faster, it takes a second.

I don't understand why the dialogs aren't snappier. It is disruptive to my workflow because I want to make changes quickly.

I have a decent VM. I've used in the past other data modelling tools, power designer data architect and the e/r studio and their dialogs are snappy and fast. I don't understand why this tool is not the same.

Any hints or suggestions?

Thanks

288 6 / Create an account to join the discussion.
andrew.wood
Follow / 5 Jan 2018 at 2:04am / Toad Data Modeler
Latest post by on 8 Jan 2018 at 10:48am

Script to identify Keys (Primary, Foreign and Primary Foreign)

Expand content
I am trying to mimic the action that occurs when one changes the Physical Model relationships from Primary Foreign Key to a Foreign Key . Why? My data model will soon have hundreds of tables. I don't...

I am trying to mimic the action that occurs when one changes the Physical Model relationships from  Primary Foreign Key to a  Foreign Key

Why?  My data model will soon have hundreds of tables.  I don't wish to perform this action by hand.

The actions seem to be:

1. The relationship line between the Entities change (Identifying = Solid line, Non-Identifying = Broken line)  NB: Code for this below

2. the associated Primary Foreign Key attributes within an Entity are 'changed' to be Foreign Key within (on, across, over) those attributes.  NB: I don't know how to do this.

3. An associated index is created on the Foreign Key.  NB: I don't know how to do this.

I have located code to identify keys object (though I could not find reference to Keys in the [Script Editor | Expert Mode] Reference Guide) However, it appears that the keys only refers to Primary Keys, not Foreign Keys or Primary Foreign Keys.  I am aware that in TOAD Data Modeler:

Foreign Keys are shown in Green Font Color
Primary Foreign Keys are identified by Blue Font  Color 
Primary Keys are shown in Red Font Color

Qu 1: Using code; How does one identify when an Attribute has a setting of Foreign or Primary Foreign

Qu 2. Using code: How to modify an Attribute setting to (Enforce a) Primary Key, Foreign Key or Primary Foreign Key.  (obviously a Attribute may only be in one of those states)

Qu 3. Using code: How does one create a new Index, containing not the Primary Key (of that Entity), but the Foreign Key (of that entity).  one Attribute, not compounded attributes.
   

I am aware that there are times when I will want to retain Primary Foreign Key over a  Foreign Key, but I believe I can program for that component.

Thank you.

//Code to Change Relationship types from Identifying to Non-Identifying

for (e=0; e<Model.Relations.Count; e++) 
{
  iterObject = Model.Relations.GetObject(e); 
  if (iterObject.Identifying)
  {
    iterObject.Identifying = false; //An associtated index will not be created, but you really should create an index to support this 
    //Do something here to create an index. I don't know what as of yet.
  }
}

//Code to identify if an Entity contains a Primary Key

for (e=0; e<Model.Entities.Count; e++)
{
  Entity = Model.Entities.GetObject(e);
    for (k=0; k<Entity.Keys.Count; k++)
    {
      Key = Entity.Keys.GetObject(k);
      if (Key.IsPrimaryKey)
      {
        //Key.Name = "PK_"+Entity.Name;
        Log.Information("Primary Key : " + Entity.Name );
      }
  }
}

227 1 / Create an account to join the discussion.
Robert
Follow / 1 Jan 2018 at 5:16pm / Toad Data Modeler
Latest post by on 2 Jan 2018 at 11:15am

TDM 6.3 - stored procedure - validation problem: set rowcount with...

Expand content
TDM reporting error - bad validation? create stored procedure my_proc ( @myRowCount int=100 ) as ... set rowcount @myRowCount ... reporting ERROR: ERROR: line xxx, column xxx, ending line...

TDM reporting error - bad validation?

create stored procedure my_proc (

@myRowCount int=100

)

as ...

set rowcount @myRowCount

...

reporting ERROR:

ERROR: line xxx, column xxx, ending line xxx, column xxx: Found '@myRowCount': Expecting: integer

THX for repair

Unanswered 315 1 / Create an account to join the discussion.
richdhan
Follow / 28 Dec 2017 at 8:56am / Toad Data Modeler
Latest post by on 1 Jan 2018 at 9:00pm

XML import from ERwin model into TDM 5.5

Expand content
I have saved the ERWin (8.2) model as .xml file. How do I import this .xml file into TDM 5.5? I tried the import option -> Case Studio 2 model and chose Files of Type as All. Am I in the right direction...

I have saved the ERWin (8.2) model as .xml file.

How do I import this .xml file into TDM 5.5?

I tried the import option -> Case Studio 2 model and chose Files of Type as All. Am I in the right direction so far?

But getting error as "Unexpected Error During Loading Model"

Thanks in advance for the support.

Richard

303 1 / Create an account to join the discussion.