Print Thread
Page 1 of 2 1 2
how to open .sql files without causing new instance
#52893 01/09/16 07:24 PM
Joined: Apr 2003
Posts: 19
Ausitn, TX, USA
Member
OP Offline
Member
Joined: Apr 2003
Posts: 19
Ausitn, TX, USA
Hello,
Is there a setting or preference that would cause double clicking on a .sql file in windows explorer to open the file in my current instance of PSD rather than spawning a new instance?

Thanks

Version 11.0.4.1774
Windows 7 (64-bit) 6.1 Build 7601 (Service Pack 1)

Last edited by Roadling; 01/09/16 07:25 PM.
Re: how to open .sql files without causing new instance
Roadling #52899 01/11/16 10:16 AM
Joined: Aug 1999
Posts: 22,220
Member
Offline
Member
Joined: Aug 1999
Posts: 22,220
This is controlled by the Windows Explorer. Maybe it can be fixed by going to Tools > Preferences > Files / Extensions, pressing the "Register filetypes" button, and pressing okay. The extensions will now be registered again. It may require a Windows reboot to make this effective.


Marco Kalter
Allround Automations
Re: how to open .sql files without causing new instance
Marco Kalter #53010 01/28/16 01:03 PM
Joined: Sep 2009
Posts: 197
Krakow, Poland
Member
Offline
Member
Joined: Sep 2009
Posts: 197
Krakow, Poland
Actually some applications handle this internally.
When application is invoked, before it opens a visible window (or performs any other visible operations or time/resource intensive tasks), it:
1. checks if it's configured to work in single-instance mode (and if no override for this setting was passed in command line parameters), and
2. if so, it looks for other instances of that same application, and
3. if found, it uses inter-process communication to order that found instance to do what it was told to do (e.g. open a document), and
4. it closes.
The effect for a user is that visually there's always one instance. In the background we have an additional instance of the application for a split second.

Ofc. if any of the conditions mentioned above (e.g. not configured to work in single-instance mode, or override in effect or no other instance found), the application behaves as normal, so the instance is fully opened etc.

Re: how to open .sql files without causing new instance
Hilarion #53034 01/29/16 05:44 PM
Joined: Sep 2003
Posts: 387
London, UK
Member
Offline
Member
Joined: Sep 2003
Posts: 387
London, UK
Agreed, this is how gVim works using the editexisting.vim plugin. Launching a new instance of PL/SQL Developer every time you double-click on a .sql file isn't really helpful as a filetype extension.

I've got into the habit of dragging files from Win Explorer into PL/SQL Dev, which works nicely, and associating the filetype with gVim for double-clicks.

Re: how to open .sql files without causing new instance
William Robertson #53035 01/29/16 07:23 PM
Joined: Feb 2013
Posts: 38
T
Member
Offline
Member
T
Joined: Feb 2013
Posts: 38
I agree that this would be great for when one instance is open. But many of us use more than one instance (including myself). It would be nice to have an option to disable this new feature if multiple instances are active.

Re: how to open .sql files without causing new instance
TealDuck #53039 02/01/16 09:04 AM
Joined: Dec 2013
Posts: 167
D
Member
Offline
Member
D
Joined: Dec 2013
Posts: 167
[quote]Maybe it can be fixed by going to Tools > Preferences > Files / Extensions, pressing the "Register filetypes" button, and pressing oka[/quote]
This don't work. Every time multiple instance...

[quote]I've got into the habit of dragging files from Win Explorer into PL/SQL Dev, which works nicely[/quote]
It don't work nicely: when you drag and drop file it go in the main connection, not in the connection where you have moved it.

Re: how to open .sql files without causing new instance
TealDuck #53050 02/02/16 11:00 AM
Joined: Sep 2009
Posts: 197
Krakow, Poland
Member
Offline
Member
Joined: Sep 2009
Posts: 197
Krakow, Poland
Many applications that have this feature do introduce an option for that (so you can choose if the application allows the system to open a new instance for a document, or the application should force it to be in one instance).
The case when you have multiple instances open (which is not actually impossible even if an application is configured to be single-instance, as some allow overrides) may work at least in two ways:
1. The application automatically chooses which instance should handle opening the document,
2. The application shows the user a selection window, where the user can decide in which instance the document should open (sometimes also allowing here to choose "new instance" option).

Re: how to open .sql files without causing new instance
Daniele #53053 02/02/16 05:29 PM
Joined: Sep 2003
Posts: 387
London, UK
Member
Offline
Member
Joined: Sep 2003
Posts: 387
London, UK
[quote]It don't work nicely: when you drag and drop file it go in the main connection, not in the connection where you have moved it. [/quote]

I just find multiple connections confusing and error-prone (as I might run something in the wrong connection) so I never use that feature, and I only ever have a "main" connection.

Re: how to open .sql files without causing new instance
William Robertson #53071 02/04/16 04:16 PM
Joined: Dec 2013
Posts: 167
D
Member
Offline
Member
D
Joined: Dec 2013
Posts: 167
Many people use multiple connections. You're a lucky person if you just only use the main!

Re: how to open .sql files without causing new instance
Daniele #53092 02/10/16 04:00 PM
Joined: Sep 2003
Posts: 387
London, UK
Member
Offline
Member
Joined: Sep 2003
Posts: 387
London, UK
[quote]Many people use multiple connections. You're a lucky person if you just only use the main![/quote]
It's not luck. I edited my preference settings. confused

Page 1 of 2 1 2

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.031s Queries: 15 (0.008s) Memory: 2.5631 MB (Peak: 3.0408 MB) Data Comp: Off Server Time: 2024-05-16 19:00:11 UTC
Valid HTML 5 and Valid CSS