TZStoredProc / Firebird error -501
Posted: 04.09.2010, 12:19
Hi,
Using:
Delphi 2010
Zeos 7 [ZEOSLIB_TRUNK_REV803]
Firebird 2.1.3 embedded
Problem:
I upgraded my project to Delphi 2010/Zeos 7 (from Delphi 2007/Zeos 6.6.6 - it used to work perfect). Now I am getting this error for stored procedures (Insert, Update, Delete etc...) :
In Delphi code:
What is the solution ? Should I wait for some time until it is fixed? How long?
Using:
Delphi 2010
Zeos 7 [ZEOSLIB_TRUNK_REV803]
Firebird 2.1.3 embedded
Problem:
I upgraded my project to Delphi 2010/Zeos 7 (from Delphi 2007/Zeos 6.6.6 - it used to work perfect). Now I am getting this error for stored procedures (Insert, Update, Delete etc...) :
In Firebird stored procedure:Project teml.exe raised exception class EZSQLException with message 'SQL Error: Dynamic SQL Error SQL error code = -501 Attempt to reclose a closed cursor. Error Code: -501. The cursor identified in a FETCH or CLOSE statement is not open.'.
Code: Select all
CREATE PROCEDURE CLIENT_I(
CLIENTNAME VARCHAR(250) CHARACTER SET UTF8 COLLATE UTF8,
"POSITION" VARCHAR(250) CHARACTER SET UTF8 COLLATE UTF8,
COMPANY VARCHAR(250) CHARACTER SET UTF8 COLLATE UTF8,
EMAIL VARCHAR(250) CHARACTER SET UTF8 COLLATE UTF8)
AS
BEGIN
INSERT INTO CLIENT (
CLIENTNAME,
"POSITION",
COMPANY,
EMAIL)
VALUES (
:CLIENTNAME,
:"POSITION",
:COMPANY,
:EMAIL);
END^
In Delphi code:
Code: Select all
procedure Tdatamod.AddClient(AClientName, APosition, ACompany, AEmail: string);
begin
with datamod.ZSP_CLIENT_I do //insert values
begin
ParamByName('ClientName').AsString := AClientName;
ParamByName('Position').AsString := APosition;
ParamByName('Company').AsString := ACompany;
ParamByName('Email').AsString := AEmail;
ExecProc;
end;
end;
What is the solution ? Should I wait for some time until it is fixed? How long?