Ver Mensaje Individual
  #5  
Antiguo 22-04-2010
jourdan jourdan is offline
Miembro
 
Registrado: may 2003
Ubicación: Mexico
Posts: 151
Reputación: 22
jourdan Va por buen camino
Encontre esta información, esta en ingles por si a alguien le sirve:


create InterBase stored procedures in my InterBase database using Delphi

Problem:
Can I create InterBase stored procedures in my InterBase database using Delphi or C++ Builder?

Solution:
*******************************************************
This document refers to:
* InterBase versions 4.X and above.
*******************************************************

Yes, you can create stored procedures via Delphi. You can use the TQuery component to pass the
SQL statements needed to create the stored procedure on the InterBase server. One caveat you
will want to be aware of is that you need to have two colons in front of memory variables instead of
one when you call the stored procedure.

Listed below are steps to create an example of defining stored Procedures via Delphi or C++ Builder:

1. Select File | New Application from the menu.
--This will bring up a new application with a blank form.

2. Click on the button icon on the standard tab of the component
palette.

3. Click on the "Data Access" tab.

4. Click on the Query icon.

5. Hit to bring up the Object Inspector.

6. Set the DatabaseName property to your InterBase alias.

7. Click on the three dots in the space next to the "SQL" property.

8. You can now enter the text of your stored procedure.

9. Type in the text of the stored procedure definition code:

create procedure myproc returns (a integer)
as
begin
a=5;
end

10. After you have entered the code for your stored procedure,
click on the button.

11. Next, you will need to tell Delphi to run your stored
procedure code. To that, do the steps listed below:
a. Click on the button.
b. Hit to bring up the Object Inspector.
c. Click on the Events tab.
d. DoubleClick on the space next to "OnClick"
e. Enter in the following code after the line
with the word 'begin' on it:
query1.execSQL;

12. Push to run the program.
__________________
Alejandro Jourdan
Responder Con Cita