Hi there everyone,
I have a Firebird stored procedure that deletes some records in a database. The database is in a network and so multiple users use the database at any given time of the day.
The stored procedure works fine. The problem is that any attempt to modify the stored procedure using say IBExpert, at a later time produces the error in the attached dialog. I can only do modifications AFTER I shut down the server and this is not practical on a busy day. I would like to be able to modify any stored procedure without having to shut down the server first.
The server code that runs the stored procedure is as follows:
//
with dm.TZStoredProc1 do
begin
//
try
StoredProcName := 'beneficiaire_doublons';
// les Params sont automatiquement créés à la suite de l'appel Prepare
Prepare;
//
ParamByName('ID').AsInteger := intGarder;
ParamByName('ID_DOUBLON').AsInteger := intSupprimer;
// Ce procédure ne retourne aucun résultat,
ExecProc;
//
CommitUpdates;
//
LJSResponse := Format('{"response": "%s"}', [strDoublonEffacerReussi]);
except
On E: Exception do
begin
//CLEANUP!
// Rollback transaction because an error occurred
CancelUpdates;
//
LJSResponse := Format('{"response": "%s"}', [strDoublonEffacerEchec]);
end // On E: Exception do
end;
end;
The server connects to the database using Zeos with the following connection properties
with TZConnection1.Properties do
begin
Add('Codepage=utf8');
Add('isc_tpb_concurrency');
Add('isc_tpb_nowait');
end; // with Properties do
I thought that committing the updates after execution closes the stored procedure BUT it still complains about the NO_WAIT. I need the NO_WAIT to avoid deadlocks in my multiuser environment.
I am using Firebird 2.5.7 in SuperClassic mode.
What can I do in the server code to close off stored procedures and be able to modify them after they have been executed?
Thanks,
JD