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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WHats wrong with this stored procedure?

Status
Not open for further replies.

kagee

Programmer
Apr 21, 2004
30
NL
Hi,

I am rather new to interbase and am using Interbase 7.1 and Delphi 7 (on windows 2003 server)-- stored procedures have JUST REFUSED to work for me...

! PS ASSIST...

i have created a simple stored procedure (INSERT_DISTRICT) to insert values into a table (districts) and calling the same from delphi code.

The table has 3 columns, districtcode, districtname, dateset (dateset is set to the default date 'now')

If i call the proceure directly from interbase, i cannot see the values inserted into the database, yet the query executes and dateset column get a new value.

INTERBASE STORED PROCEDURE CODE:

connect "PORTFOLIO.gdb" USER="SYSDBA" password="masterkey";
SET TERM ^;
CREATE PROCEDURE insert_district
(
insDcode varchar(8),insDname varchar(20)
)
AS
BEGIN
INSERT INTO districts
(districtcode, districtname)
VALUES
(
:insDcode,
:insDname
);
END^

SET TERM ; ^
 
Probably you have to refresh your query in delphi

Steven van Els
SAvanEls@cq-link.sr
 
And make sure you COMMIT the transaction from which you're executing the procedure.

Martijn Tonies
Database Workbench - the developer tool for InterBase, Firebird, MySQL & MS SQL Server
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top