Additional
dbCAP
AnyDAC
ThinDAC
NCOCI8
Topic: sql with parameters
sql with parameters
Posted: 2003/06/25 05:51
 
I want to use TOCIQuery with parameters. How can I read out SQL in wich the parameter references replaced by parameters values. I mean I want to read out that SQL wich would be run on the Oracle server.
RE: sql with parameters
Posted: 2003/06/25 09:26
 
Parameter values are passed to Oracle separately from sql operator text. They never appear in SQL operator text.
This allowes you to parse operator once (check out propertty TOCIQuery.Prepared) and execute many times with different parameter values. This improves performance very much.
To find out parameter values while debugging, use TNCMonitorClient component and Delphi menu->Database->SQLMonitor
TOCIQuery has Macros which are similar to Parameters, but they are substituted as strings into sql operator text. Text with macros replaced with their values you can get from TOCIQuery.Text property.
Use macros insead of parameters with care because they can degrade server performance