Originally posted by sergejh:
The full parse and execute are combined in one call to the server.
And DOA function do that is Execute() ?
Now, I doing next:
[Skipped]
Is this right? But this variant take server resources...
I really don't understand what for you need to check the check your SQL-statement without executing.
You latest approach is generally correct but bad as bad. Moreover, in some cases it may cause some database changes, for example, if it fire some triggers with authoomous transaction iside. And it really can consume a lot of server resources, especially if statement is correct.
BTW you can despite the fact that oparse() is obsoleted it is till available for Oracle 8i and 9i (don't know about 10g). You can convert ORacle Server context to LDA with OCISvcCtxToLda() and then use old OCI7 functions.
OCI9 contains as well OCIStmtPrepare() and OCIStmtPrepare2() functions those are closest native counterpats of oparse(), but they performe only local check of statement, so much less rigorous then oparse().
And final touch - you can use OCI functions from DOA, they are defined in OracleCI unit. To obtain necessary contexts and handles you shall use ExternalAUT ... ExternalSVC properties of TOracleSession.
IF you wiuld explain purpose of the check that you wan't to do I may be able to make better suggestion.
Feel free to mail me directly if you wish (you may mail in Russian if you prefer).