# SQLnav  occasionally loses a connection with a saved file

**URL:** <https://forums.toadworld.com/t/sqlnav-occasionally-loses-a-connection-with-a-saved-file/29924>\
**Category:** SQL Navigator\
**Created:** [April 25, 2014, 5:59am UTC](https://forums.toadworld.com/t/sqlnav-occasionally-loses-a-connection-with-a-saved-file/29924 "2014-04-25T05:59:53Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![MPAX](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/mpax/32/83_2.png) [@MPAX](https://forums.toadworld.com/u/MPAX)\
**Post date:** [April 25, 2014, 5:59am UTC](https://forums.toadworld.com/t/sqlnav-occasionally-loses-a-connection-with-a-saved-file/29924/1 "2014-04-25T05:59:53Z")

</div>

I am working with a file, and like everyone else who has once lost everything he wrote in couple of past hours, I hit CTRL+S every single minute or maybe even more often 🙂

The problem is - occasionally (many times a day) SQLnav brings up Save As dialogue like I am saving the file for the first time.

It would be ok, if I just could hit Enter and overwrite the file, but the Save As dialogue has browsed to a completely different folder.

So I have to navigate back where the file actually is saved and then overwrite it.

I cannot reproduce this thing. I just wanted to know if am I doing something wrong or maybe someone else is experiencing this problem?

Has been an issue also on Win 7 (64bit) and SQLnav 6.3. Now on Win 8.1/SQLnav 7.0.1.

---

<div class="post-metadata">

**Author:** ![Shirly](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/shirly/32/82_2.png) [@Shirly](https://forums.toadworld.com/u/Shirly)\
**Post date:** [April 29, 2014, 1:02am UTC](https://forums.toadworld.com/t/sqlnav-occasionally-loses-a-connection-with-a-saved-file/29924/2 "2014-04-29T01:02:03Z")

</div>

Hi Martin,

Are you saying that the file is opened and saved in your code editor, then you continue doing other operations in Nav, but the save as window just come out all of a sudden, and the location is incorrect?

If so I haven’t met such situations so far, I am wondering that if you have set any short cut key to trigger this save as event. I will continue checking for you.

BTW can you please check the files status from the code editor status bar? the file should be shown as Modified if anything changed, and Ctrl+S will make that status disappear which means your file has been saved successfully. You can keep an eye on that status next time when you meet this problem again.

Thanks,

Shirly

---

<div class="post-metadata">

**Author:** ![bill.horowitz](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@bill.horowitz](https://forums.toadworld.com/u/bill.horowitz)\
**Post date:** [May 5, 2014, 12:03pm UTC](https://forums.toadworld.com/t/sqlnav-occasionally-loses-a-connection-with-a-saved-file/29924/3 "2014-05-05T12:03:49Z")

</div>

I reported the same problem in a prior version (6.x?) of SQL Nav, and it was eventually patched. Now I am having the same problem again in 7.0.1. Dangerous problem because you can lose track of where your source code is, or overlay something important.

Don’t know the exact scenario where it occurs, but happens when working on multiple files from different paths/folders at same time. I go back to previously opened file, and when go to save it forgets where it got the file. I then have to manually navigate to where I think it came from and do a Save-As.

---

<div class="post-metadata">

**Author:** ![MPAX](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/mpax/32/83_2.png) [@MPAX](https://forums.toadworld.com/u/MPAX)\
**Post date:** [May 6, 2014, 12:45am UTC](https://forums.toadworld.com/t/sqlnav-occasionally-loses-a-connection-with-a-saved-file/29924/4 "2014-05-06T00:45:43Z")

</div>

“Are you saying that the file is opened and saved in your code editor, then you continue doing other operations in Nav, but the save as window just come out all of a sudden, and the location is incorrect?”

The “Save As” window comes up when I do “CTRL+S”.

No, I have only one shortcut defined and it is “CTRL+SHIFT+Z” (irrelevant).

Yes, the file status is “Modified”, because I have modified it once again. But why the “Save As” dialogue pops-up (?)

It just happened again this morning with and this is important - I have opened only 1 session and only 1 file.

I typed something into the file, saved. Then worked with some other applications. Returned back to Nav, typed something to the same file, CTRL+S, and the “Save As” appeared again.

---

<div class="post-metadata">

**Author:** ![MPAX](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/mpax/32/83_2.png) [@MPAX](https://forums.toadworld.com/u/MPAX)\
**Post date:** [May 6, 2014, 1:42am UTC](https://forums.toadworld.com/t/sqlnav-occasionally-loses-a-connection-with-a-saved-file/29924/5 "2014-05-06T01:42:44Z")

</div>

It happened again and the folder where the “Save As” dialogue is located is the same where the file is saved. So I only had to click Save and Overwrite it.

---

<div class="post-metadata">

**Author:** ![vliu](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/vliu/32/72_2.png) [@vliu](https://forums.toadworld.com/u/vliu)\
**Post date:** [May 6, 2014, 1:50am UTC](https://forums.toadworld.com/t/sqlnav-occasionally-loses-a-connection-with-a-saved-file/29924/6 "2014-05-06T01:50:15Z")

</div>

Thanks Martin and Bill for all the information. SQLNAV-1593 is created for this error. We will investigate this error and will let you know once we fix it.

**From:** Martin [[mailto:bounce-MPAX@toadworld.com](mailto:bounce-MPAX@toadworld.com)]

**Sent:** Tuesday, 6 May 2014 4:43 PM

**To:** [sqlnav@toadworld.com](mailto:sqlnav@toadworld.com)

**Subject:** RE: [SQL Navigator - Discussion Forum] SQLnav occasionally loses a connection with a saved file

**[RE: SQLnav occasionally loses a connection with a saved file](http://www.toadworld.com/products/sql-navigator/f/51/p/21899/46453.aspx#46453)**

Reply by Martin

It happened again and the folder where the “Save As” dialogue is located is the same where the file is saved. So I only had to click Save and Overwrite it.

To reply, please reply-all to this email.

[Stop receiving emails](http://www.toadworld.com/products/sql-navigator/f/51/t/21899.aspx?subscribe=false) on this subject.

Or [  
Unsubscribe from SQL Navigator - General](http://www.toadworld.com/products/sql-navigator/f/51.aspx?subscribe=false) notifications altogether.

SQL Navigator - Discussion Forum

[Flag](http://www.toadworld.com/products/sql-navigator/f/51/p/21899/46453.aspx?AbuseContentId=f01cdc2d-c3f3-4ac3-bd8a-b1395ee6014c&AbuseContentTypeId=f586769b-0822-468a-b7f3-a94d480ed9b0&AbuseFlag=true)  
this post as spam/abuse.

![](http://gyk.r.mailjet.com/o/04j0/ff0414f1/4uy8o30e.gif)

---

<div class="post-metadata">

**Author:** ![Shirly](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/shirly/32/82_2.png) [@Shirly](https://forums.toadworld.com/u/Shirly)\
**Post date:** [May 6, 2014, 2:14am UTC](https://forums.toadworld.com/t/sqlnav-occasionally-loses-a-connection-with-a-saved-file/29924/7 "2014-05-06T02:14:00Z")

</div>

Hi Martin,

We figured this issue out, can you please confirm if you did Save when there is result tab displayed? We reproduced it when you made change in the file, then execute the queries in the file, after result tab display, do Ctrl+S will make save as window come out. That is a bug confirmed and we will fix it soon.

Please let us know if this is the situation you met, thanks for your feedback.

Regards,

Shirly

---

<div class="post-metadata">

**Author:** ![MPAX](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/mpax/32/83_2.png) [@MPAX](https://forums.toadworld.com/u/MPAX)\
**Post date:** [May 6, 2014, 2:30am UTC](https://forums.toadworld.com/t/sqlnav-occasionally-loses-a-connection-with-a-saved-file/29924/8 "2014-05-06T02:30:18Z")

</div>

If you mean:

1. Modify the file contents.

2. Execute some SQL(query) from the file - so that some results are displayed in the grid.

3. CTRL+S.

Then no - this doesn’t bring up the SAVE AS for me. It is too common scenario. If it popped up after just these simple 3 steps, then it would be completely unusable.

---

<div class="post-metadata">

**Author:** ![Shirly](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/shirly/32/82_2.png) [@Shirly](https://forums.toadworld.com/u/Shirly)\
**Post date:** [May 6, 2014, 2:50am UTC](https://forums.toadworld.com/t/sqlnav-occasionally-loses-a-connection-with-a-saved-file/29924/9 "2014-05-06T02:50:38Z")

</div>

It only happens after running multi SQLs and you are in one of the sub result tabs, strange it works fine for you here but broken in any other place. ☹

---

<div class="post-metadata">

**Author:** ![MPAX](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/mpax/32/83_2.png) [@MPAX](https://forums.toadworld.com/u/MPAX)\
**Post date:** [May 6, 2014, 3:39am UTC](https://forums.toadworld.com/t/sqlnav-occasionally-loses-a-connection-with-a-saved-file/29924/10 "2014-05-06T03:39:59Z")

</div>

Ah yes, if multiple queries are run (with F9) then it can be reproduced.

Maybe that’s it. Maybe I accidentally pressed F9 instead of F8 every time it happened.

After this fix - we’ll see if that’s the case.

---

<div class="post-metadata">

**Author:** ![MPAX](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/mpax/32/83_2.png) [@MPAX](https://forums.toadworld.com/u/MPAX)\
**Post date:** [May 6, 2014, 5:08am UTC](https://forums.toadworld.com/t/sqlnav-occasionally-loses-a-connection-with-a-saved-file/29924/11 "2014-05-06T05:08:19Z")

</div>

It turns out that a new Result tab appears if the query you’re about to execute is selected as a text even if you use F8.

If the cursor is placed somewhere in the query then F8 doesn’t bring out a new Result tab.

So the steps to reproduce are:

1. Modify the text (don’t save).

2. Mark some SQL statement in the text.

3. Execute it - F8.

4. CTRL+S.

And yeah, there is a workaround - to click back to tab “Script” 🙂 Didn’t know this before.

---

<div class="post-metadata">

**Author:** ![Shirly](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/shirly/32/82_2.png) [@Shirly](https://forums.toadworld.com/u/Shirly)\
**Post date:** [May 7, 2014, 1:04am UTC](https://forums.toadworld.com/t/sqlnav-occasionally-loses-a-connection-with-a-saved-file/29924/12 "2014-05-07T01:04:43Z")

</div>

Yes Martin you are right, sorry I should made it more clear before. Anyway we have fixed it and will apply in the next build for you.

Thanks for your investigating. 🙂

---

<div class="post-metadata">

**Author:** ![vliu](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/vliu/32/72_2.png) [@vliu](https://forums.toadworld.com/u/vliu)\
**Post date:** [May 16, 2014, 1:49am UTC](https://forums.toadworld.com/t/sqlnav-occasionally-loses-a-connection-with-a-saved-file/29924/13 "2014-05-16T01:49:48Z")

</div>

Hi Martin and Bill,

This is fixed in the latest beta. You can try it out.

Thanks,

Vincent
