Making the parameter token configurable

walterheck

Member²
We use a delphi program against our database. As such, we are constantly writing and copy/pastign queries from and to Delphi. In delphi, a parameter in a query is designated by a colon (':'). In PL/SQL dev, it is done by an ampersand ('&'). Would it be possible to make this conifgurable, so that I can change it to be ':' in PL/SQL dev as well?
Would save a lot of replacing those tokens with one and each other :)
 
You need to use the Test Window for this. It supports the bind variables you are using in your Delphi code.
 
The problem is that
1) the test window's UI is a bit strange for this (doesn't ask for the values of the parameters upon executing the query)
2) The test window takes 11 seconds to execute a query that using & in a SQL window takes less than 3 seconds
 
In the test window, if you enter your query (paste from clipboard, type it in) using the ':' instead of '&', what you then need to do is right click in the grid at the bottom and select 'scan variables'. Change the Types to match and put your desired values for those variables in the Value column and then execute.

Or, you could use the PasteOptions plugin by Cloud to replace the ':' with '&' - so you would copy the SQL to the clipboard, use the paste option to convert it, then copy that to Delphi. I'd probably build another paste option for ':' to '&'.
 
@ScottMattes: thanks for the reply. I however am a programmer and therefore utterly lazy. I understand what you are saying, but all of that is even mroe work than the manual stuff we are doing right now. I just thought that having the option of configuring a : in the SQL window to indicate a parameter instead of & would make mine and all those other delphi prggers' lives so much easier :)
If it's not possible or if I am asking stupid things just tell me and i'll suck it up :)
 
Another option is writing a custom plugin for yourself that replaces the :PARAM fields with real values (of PL/SQL style parameters)
 
Back
Top