![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 2 of 2 total |
![]() |
Tue, Jan 22 2013 4:25 PM | Permanent Link |
Hyun Ju Yong | Can elevatedb execute procedure on the fly?
Firebird can execute procedure without creating like this. ibquery1.SQL.Text = ' execute block returns (val int) as begin select.... into val; suspend; end'; ibquery1.open; |
Tue, Jan 22 2013 8:29 PM | Permanent Link |
Fernando Dias ![]() | Hyun,
Yes, but in ElevateDB, that is called a Script : Also, scripts can have parameters and return a dataset, exactly as a stored procedure. Here is an example with parameters: EDBScript1.SQL.Text := 'SCRIPT (IN ID1 INTEGER, IN ID2 INTEGER, OUT X INTEGER)' + 'BEGIN '+ ' DECLARE N1, N2 INTEGER ' + ' EXECUTE IMMEDIATE 'SELECT N INTO ? FROM Tbl1 WHERE Id = ?' USING N1, ID1 ; ' EXECUTE IMMEDIATE 'SELECT N INTO ? FROM Tbl1 WHERE Id = ?' USING N2, ID2 ; ' SET X = N1 + N2 ; ' + 'END' ; EDBScript1.ExecScript ; Please take a look at this section of the manual for further details: http://www.elevatesoft.com/manual?action=viewtopic&id=edb2&product=rsdelphiwin32&version=XE2&topic=Executing_Scripts -- Fernando Dias [Team Elevate] |
This web page was last updated on Tuesday, July 1, 2025 at 07:22 PM | Privacy Policy![]() © 2025 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |