Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Firebird e Interbase (https://www.clubdelphi.com/foros/forumdisplay.php?f=19)
-   -   crear un trigger firebird desde delphi 2007 (https://www.clubdelphi.com/foros/showthread.php?t=81911)

ingabraham 03-01-2013 01:10:35

crear un trigger firebird desde delphi 2007
 
crear un trigger firebird desde delphi 2007.
osea con codigo delphi, sin necesidad de entar a firbird sql vs. 2.0.

:confused:

cloayza 03-01-2013 01:50:20

Cita:

Empezado por ingabraham (Mensaje 452819)
crear un trigger firebird desde delphi 2007.
osea con codigo delphi, sin necesidad de entar a firbird sql vs. 2.0.

:confused:

A ver como va este demo.

IBX:
Código Delphi [-]
 with Query1 do begin
  ParamCheck := False;
  with SQL do begin
    Clear;
    Add('CREATE PROCEDURE GET_NUMERO_CLIENTES');
    Add('RETURNS (NClientes integer)');
    Add('AS');
    Add('BEGIN');
    Add('  SELECT COUNT(CLIENTE_ID)');
    Add('  FROM CLIENTES');
    Add('  INTO :NCLientes;');
    Add('  SUSPEND;');
    Add('END');
  end;
  ExecSQL;
end;

FIBPlus:
Código Delphi [-]
 with pFIBQuery1 do begin
  ParamCheck := False;
  with SQL do begin
    Clear;
    Add('CREATE PROCEDURE GET_NUMERO_CLIENTES');
    Add('RETURNS (NClientes integer)');
    Add('AS');
    Add('BEGIN');
    Add('  SELECT COUNT(CLIENTE_ID)');
    Add('  FROM CLIENTES');
    Add('  INTO :NCLientes;');
    Add('  SUSPEND;');
    Add('END');
  end;
  Prepare;
  ExecQuery;
end;

Saludos cordiales

Casimiro Notevi 03-01-2013 02:24:03

Aunque has puesto de ejemplo un "stored procedure", es igual para crear un trigger :)

cloayza 03-01-2013 03:18:06

Cita:

Empezado por Casimiro Notevi (Mensaje 452823)
Aunque has puesto de ejemplo un "stored procedure", es igual para crear un trigger :)

Chuuuuuuuuuuuuuu...Parece que mi comprensión lectora no anda muy bien a esta altura del año...

Se me ha hecho eterno este 2013...:mad:

Saludos Casimiro

Casimiro Notevi 03-01-2013 10:46:10

Cita:

Empezado por cloayza (Mensaje 452825)
Se me ha hecho eterno este 2013...:mad:

Será mejor que te tomes una infusión calentita y te vayas a dormir un rato :D:D:D


La franja horaria es GMT +2. Ahora son las 06:21:57.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi