Hi
Is it possible to pass parameter other than column name during INSERT into database table via TOraQuery? I used 'SQL Generator' (one of sheets of TOraQuery Editor) to prepare stored procedures for INSERT, UPDATE, etc. where all parameters equal column names in database table. When I tried to add another parameter to these stored procedures, then during execution I received error 'Project raised exception class EDatabaseError with message 'Not found field corresponding parameter''. Maybe it's possible somehow via TUpdateSQL + TOraSQL.
I use ODAC 8.1.4.
TOraQuery, additional parameters during INSERT
Re: TOraQuery, additional parameters during INSERT
Hello,
You can set parameter values, which names are absent/mismatch in the query field list in the OraQuery.BeforeUpdateExecute method, for example:
You can set parameter values, which names are absent/mismatch in the query field list in the OraQuery.BeforeUpdateExecute method, for example:
Code: Select all
procedure TForm1.OraQuery1BeforeUpdateExecute(Sender: TDataSet;
StatementTypes: TStatementTypes; Params: TDAParams);
begin
Params.ParamByName('non_existent_parameter').AsInteger := 10;
end;