|Subject||Re: [Firebird-Architect] Exec. statement parameters|
> Vlad Khorsun escreveu:What is "general" and "normal client behavior" ?
>>> Why the new execute statement (in the separate branch) syntax has named
>>> parameters using colons instead of just question marks?
>>> AFAIR, syntax wasn't discussed here.
>> Because it is natural way for users of how to use parameters in client applications.
>> Firebird acts as client application in this case. Note, both colons and questions are
>> allowed to mark parameters. What problem do you see there ?
> It's natural to Delphi users, nothing in general and inconsistent with
> normal client behavior.
> Execute block uses question mark, normal parameters uses question mark.EXEC BLOCK is a Firebird statement. Content of EXEC STMT is _not_ a Firebird
statement (since v2.5)
> But in Delphi they are replaced.and what ? This is done to conform FB API rules. Another DBMS may have another
rules to mark parameters.
> Your example also shows how confusing it is:It is not confusing. It allows to
> S = 'INSERT INTO TTT VALUES (:a, :b, :a)';
> EXECUTE STATEMENT (:S) (CURRENT_TRANSACTION, CURRENT_CONNECTION)
> Three parameters, two names, and two values...
> I'm against this syntax.
a) use named parameter more then one time in query
b) evaluate parameter value only once despite of how many times it is used in query.
c) looks natural for Firebird users which write server-side code. Where do you see
question-marked parameters in PSQL ?
It is perfect abilities and i will insist on it.