Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Interbase stored procedures with Delphi 1

Status
Not open for further replies.

kagee

Programmer
Apr 21, 2004
30
NL
Hi,
i am trying to call an interbase stored procedure from a delphi app but after execproc i cannot see the data in the database...

the stored procedure is for inserting some values into several tables in the database.

Urgently need HELP!!!
 
i've changed the procedure to first try & insert 2 values into one simple table -districts.
am using D7 & IB7.1
after execproc, the data doesnt show in the database
the stored procedure is :

set term ^;
create stored procedure insert_district
(distname, distcode)

as begin
(districtname, districtcode);
end

values
(
:distname,
:distcode
);
set term ;^

 
What is the DELPHI code you are using for calling the SP?

Leslie
 
Hi
am also using a datamodule where i have dropped all my IB connection and IB transaction, and then the TstoredProc

the delphi code is:

storedproc1 := datamodule1.Tstoredproc1.create(self);

with storedproc1 do begin

datamodule1.Tstoredproc1.prepare
datamodule1.Tstoredproc1.parambyname('distname').AsInteger :=districtnametxt.text;
datamodule1.Tstoredproc1.parambyname('distcode').AsInteger :=districtcodetxt.text;

datamodule1.Tstoredproc1.execproc;
datamodule1.Tstoredproc1.free
end;
 
storedproc1 := datamodule1.Tstoredproc1.create(self);

with storedproc1 do begin

prepare
parambyname('distname').AsInteger :=districtnametxt.text;
parambyname('distcode').AsInteger :=districtcodetxt.text;

execproc;
free
end;

you've already declared storedproc1 as datamodule1.Tstoredproc1 you don't need to keep referencing the whole thing after you say 'with storedproc1 do'

HTH

Leslie
 
the problem am having is that after executing the SP, i cannot see the data in the interbase database.

Theres smthing am not just getting right ...
(even after executing the procedure directly from interbase,i can not see the data...)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top