Beta 16.0.74.1492, Execute via SQL*Plus - incorrect path

Beta 16.0.74.1492

If I run a saved build script which contains calls to others scripts via the Toad option "Execute via SQLPlus" (which I have to do, due to this problem which still exists) e.g.
@@AnotherScript.sql
@@AnotherScript2.sql
SQL
Plus no longer executes from the context of the path of the saved build script (executes from temp), so those other scripts fail with path errors.

For me, that works if I load the master script into the editor and don't make any changes to it.

The moment I make a change (but don't save it), then I can reproduce what you are talking about.

But then if I save again, it works.

The reason this happens is that with an unsaved file, we save a copy to the TEMP folder. I guess we could instead save it as a temp file to the folder that the file is already in, but that assumes it's in a read-write location, which it probably is, but might not be.

Maybe we should prompt for saving if file is modified and contains @@ to call other scripts.

Hi Paul,

You mentioned that other error still exists....can you get me a call stack next time it happens? (See last post in that thread)

Thanks

1 Like

Hi John

Ah ok, that makes sense and I understand the problem now. I probably inadvertently changed the file.

Both your suggested solutions seem sensible.

Thanks