Firebird Stored procedure delphi #2

In firebird, the syntax to create TRIGGERs and Stored Procedures is as below:

SET TERM !! ;
CREATE TRIGGER auto_update_1 FOR DBPATHS
after INSERT POSITION 0
AS
BEGIN
insert into commission values (100,100);
END !!
SET TERM ; !!

SET TERM !! ;
CREATE PROCEDURE CountTo10
RETURNS (Cnt INTEGER)
AS
BEGIN
Cnt = 1;
WHILE (Cnt < = 10) DO
Cnt = Cnt + 1;
END !!

SET TERM ; !!

—-
An example how to use stored procedure from delphi is as follows:
procedure TForm1.Button1Click(Sender: TObject);
var

result : integer;
begin
if ibdatabase1.Connected = false then
begin

ibdatabase1.Connected := true;

end;

with IBStoredProc1 do
execproc;

IBStoredProc1.Transaction.Commit;

result := IBStoredProc1.Params.ParamValues[‘Cnt’];

showmessage(inttostr(result));

end;

From: http://sitestree.com/?p=4727
Categories:2
Tags:
Post Data:2008-07-08 16:53:04

    Shop Online: <a href='https://www.ShopForSoul.com/' target='new' rel="noopener">https://www.ShopForSoul.com/</a>
    (Big Data, Cloud, Security, Machine Learning): Courses: <a href='http://Training.SitesTree.com' target='new' rel="noopener"> http://Training.SitesTree.com</a> 
    In Bengali: <a href='http://Bangla.SaLearningSchool.com' target='new' rel="noopener">http://Bangla.SaLearningSchool.com</a>
    <a href='http://SitesTree.com' target='new' rel="noopener">http://SitesTree.com</a>
    8112223 Canada Inc./JustEtc: <a href='http://JustEtc.net' target='new' rel="noopener">http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a>
    Shop Online: <a href='https://www.ShopForSoul.com'> https://www.ShopForSoul.com/</a>
    Medium: <a href='https://medium.com/@SayedAhmedCanada' target='new' rel="noopener"> https://medium.com/@SayedAhmedCanada </a>