Toad World® Forums

Connections Dialog Keeps Popping Up Regardless if Checked or Unchecked when opening SQL Modeller file (.tsm)

I have TDP 3.3 and we have stored connections, but when we open a SQL Modeller file (.tsm) in Toad, a Connections Dialog Box continues to come up initially. There’s a small box on the bottom that says “Show this dialog on startup” which we have unchecked. Also on Tools/Options General, we have the “Show connection dialog on startup” unchecked. But again, when we open these .tsm files, it always pops up and we have to hit select to the current startup connection which has the un/pw and connect on startup checked.

Is there any way to make it so this dialog box doesn’t continue to come up?

Thanks Chad

To Chad.King:

Thank you for posting in Toad World.

I was able to reproduce your scenario by renaming the connection. If the connection that the .tsm file was saved with was renamed later (through the connection's Connection Properties dialog or by right-clicking the connection -> Rename), Toad will not be able to find that desired connection. In this case, when opening .tsm files, a Connection Window will appear with the connection the .tsm file was looking for and a list of other connections saved in Toad for the same platform.

Fix:

  1. Open the .tsm file
  2. When the Connection list appears, select the desired connection.
  3. When the Query Builder loads with the desired connection, use CTRL+S to save a new .tsm file.
    Use this .tsm file instead, as it will have the current connection name associated with the connection!
    Let me know if this has resolved your issue.

-Joshua Liong

Hi Joshua,

Thank you for the respose. Unfortunately, this didnt fix the problem. We never change the .tsm file, we just created a very simple one, saved it, then closed it. When opening again the connection dialog came back up. I went ahead and saved it again though after hitting connect thinking it should save the connection, but it still doesnt. I got back out and back in and still no change, the connection dialog box continues to come up every time I open it.

Chad

To Chad.King:

I apologize. I regret that I have trouble reproducing the issue under your conditions. I will require some additional information to pursue this matter, including:

  1. The platform(s) your connections use in your .tsm(s).

  2. The platform(s) that Toad connects to on Start-up.

  3. Any additional information you can provide that may be relevant.

Thanks,

-Joshua Liong

Joshua,

I appreciate the response.

  1. The .tsm file is connecting to just an odbc connection we have established to our billing system, which is an AS400. It’s what we call an I-Series ODBC connection, but it’s ODBC non the less.

  2. The platforms that Toad connects to on start up are just this one ODBC connection and that’s it. At this point, we dont have any other platforms connecting at startup.

  3. I’m not sure what other info I can provide, but please let me know if there’s anything else you need.

Thanks!

Chad

Chad do you happen to know if the services on the AS400 box are set to autostart, I seem to remember from a long time ago that problems with I Series Access ODBC Drivers were caused by the fact that the server when into dormant mode - this may be therefore an incompatibility problem between the way our connections are actually utilized and the connection string that is saved in the TSM files. I seem to remember that if the QUSRWRK subsystem is not running at the time of connection it forces the connection string to be rejected.

Joshua lets get together on this and see if we can understand what is happening with the TSM file saved string and if it can be improved.

Regards

Peter

Please generate a support bundle and send that as well as the tsm file and screenshot of what is occurring. (Show current connection and the popup connection dialog)

Debbie, I apologize for the delay on this. Can I ask, what is a support bundle and how do I generate that?

Chad

To Chad.King:

A Support Bundle provides information about the state of the application which is useful for troubleshooting issues. Show us the support bundle by following these steps:

To Generate a Support Bundle (for this issue):

  1. Reproduce the issue by opening the .tsm file.
  2. When the Connections Window appears, go ahead and close it.
  3. Select Help -> Support Bundle. A new tab “Suport Bundle … Toad Data Point.zip” will appear.
    HelpSupportBundle.png
  4. Save the Support Bundle (one of two ways listed below):
  • If Microsoft Outlook is configured in your system, a Compose Email window will appear with the desired attachment. Feel free to drag and drop it to the desktop or any folder.
    To Attach the Support Bundle to a post:
  1. In the forum, post a reply to the thread using Rich Formatting
    richformat.png
  2. A Create Post page will appear. Select the **Options **tab.
    optionstab.png
  3. Click the “Click to Add” hyperlink to add the support bundle.
    clicktoadd.png
    We look forward to reviewing your support bundle.

-Joshua Liong

Can you also post a copy of the tsm file? Maybe there is something in the file causing this.

Debbie, thanks for the information and the patience. I’m attaching the support bundle file. Looks like I can only attach one item per post, so I’ll attach the .tsm file on a separate response. Thanks again.

Chad
ToadSupportBundleToad Data Point.zip (287 KB)

Attached is the sample .tsm file in which the dialog box comes up. Again the dialog box comes up with every .tsm file. Please let me know if you need anything else and as always, thanks for the help with this.

Chad
Test_SQL.zip (1.5 KB)

Hi, I was just seeing if there was any updates on this question?

Thanks

Chad

A couple of us looked at this file. The Query Builder file does not have any connection info saved in it, therefor it can’t resolve to a connection.

This could happen because the file was saved when there was a “Could not modal error”. This happens when a user sends SQL from an editor and the Query Builder was not able to reverse engineer or the user tried editing the SQL and there was a syntax error.

in the end, this is not a valid SQL file. Try going back to the iSeries connection and building the SQL by dragging and dropping the tables onto the designer. After adding columns, filters, etc, save the file and reopen.(Make sure the Query tab does not show any syntax errors. If there are errors you will see some squiggly lines) Does it find the connection?

Debbie, I was able to reproduce (since this is a simple query) using only the designer on this query and it indeed stored the connection and did not prompt. Therefore this brings up the question, do all queries have to be built in the designer to save the connection information correctly? We are so used to the data that we have and often have to write complex queries that we would prefer to write directly in SQL. I did check the syntax of this particular query and it has no syntax issues or squiggly line. So just trying to see if this is something we need to get used to if we continue to code directly in SQL or if there’s another way to add that connection information to the .tsm file in another way?

Thanks again.

Chad

In general if a query executes in the SQL editor it should be able to be sent to Query Builder and saved with connection. The biggest area we have issues is in not fully qualifying an table/column. The SQL editor allows you to change session scope. The Query Builder does not and you have to use the scope of the session logon. So try fully qualifying all SQL and see if that improves things.

OK, so forgive me, I’m still a bit new to TDP, how do I fully qualify the SQL?

Thanks a bunch and I appreciate your patience with me.

Chad

This will be a little different based on the database type. But mainly you need to include the database/schema name in front of the table. Then I suggest using an alias and use this alias in front of each column.

SELECT ADDRESS.CITY, ADDRESS.STATE

FROM QUEST_DEV.ADDRESS ADDRESS

If this is SQL Server it would be this:

SELECT address.CITY, address.STATE

FROM QUEST_STAGE.dbo.address address

Hi Debbie,

I did try to “fully qualify” the query. In fact, I copied the SQL created from using the Diagram tab because it appeared to be fully qualified also. I directly copied that and only placed this in the SQL tab without doing anything with the Diagram and saved it as a new .tsm file. Unfortunately when closing and re-opening it still comes up with the Connections dialog box. I do agree though, it most definitely has to do with the creation of the SQL directly without using the Diagram view, but again we’re so used to writing in direct SQL for much more complicated queries, it would be hard to only use the diagram view for all just to keep the dialog box from coming up. If you have any other ideas, please let me know. As always, I very mucha appreciate the help.

Chad

Do the same steps as above but before saving press the Visualize Query button. This takes the SQL statement and creates it in the diagram tab. If there are issues a message will display saying it couldn't be modeled and then you will see syntax hints of where the problems are. In my sample screenshot I have more than one SQL in the Query Builder diagram so the squiggles are on the second select. Can you try this and post a screenshot of any errors?