Save file to HDD and compile simutaneously?

Hi

I would like to open a local file of a package body from my hard drive (from SVN local copy) and make some changes. Then I would like to save it back both to my hard drive and also save and compile it to the database 8I have active database connection).

The saving process is at the moment the following:

  1. Click “File>Save File As”, click “Save” and click “Yes” to overwrite the existing file in HDD
  2. Press “Ctrl+S”, click “Yes” to save and “Yes” again to replace the existing procedure in the database

Is it possible to do all this in one step (like press ctrl+S and everything will be saved to my HDD and database)? Using Macro or sth like this? Or maybe there are some plugins available.

Regards,
Märten

Hi Märten,

I suppose the file you have in hard drive contains the DDL of the package body. It should have CREATE OR REPLACE at the beggining of the DDL.

You can use the Open File button in Code Editor, then choose Any file for Files of type in the Open dialog. Select the file of package body and open it into Code Editor. Now you can make changes to the DDL. When you want to save the changes: 1) “Ctrl+S”, this will save the changes to the file in hard drive; 2) “F9”, this will execute the DDL and save the object to the database.

Let me know if this is what you want.

Thanks,
Vincent

Hi Vincent,

If I open the source file from Windows Explorer then your solution works and the DDL is displayed as any other script. However, there is no Code Explorer (with listed names of procedures and functions) displayed in this case.

I want Code Explorer but it would be also nice to save and compile the whole thing with one or two clicks.

Regards,
Märten

Hi Märten,

I don't have any problem with viewing the Code Explorer when I open the source file form Windows Explorer. It looks the same to the one that I open from the object from database. Did I look at the right place?

Thanks,
Vincent