Subject | Blobs in SP |
---|---|
Author | Riho-Rene Ellermaa |
Post date | 2003-04-30T07:20:58Z |
When I run this procedure with existing PTYPE and ID, so that the UPDATE sentences will be called, I get "Blob not found" error.
What is wrong with this syntax?
If I just run
update digilog set sign1=:sign where id=:id and ptype=:ptype;
within procedure (commenting other lines out) then it works?!?
ALTER PROCEDURE INSERT_DIGILOG (PTYPE INTEGER,
ID INTEGER,
SIGN BLOB ,
SIGNNO INTEGER)
AS
begin
if(:signno=1) then
insert into digilog(ptype,id,sign1) values(:ptype,:id,:sign);
else
insert into digilog(ptype,id,sign2) values(:ptype,:id,:sign);
when SQLCODE -803 do
begin
if(:signno=1) then
update digilog set sign1=:sign where id=:id and ptype=:ptype;
else
update digilog set sign2=:sign where id=:id and ptype=:ptype;
end
end
Riho-Rene Ellermaa
senior programmer
What is wrong with this syntax?
If I just run
update digilog set sign1=:sign where id=:id and ptype=:ptype;
within procedure (commenting other lines out) then it works?!?
ALTER PROCEDURE INSERT_DIGILOG (PTYPE INTEGER,
ID INTEGER,
SIGN BLOB ,
SIGNNO INTEGER)
AS
begin
if(:signno=1) then
insert into digilog(ptype,id,sign1) values(:ptype,:id,:sign);
else
insert into digilog(ptype,id,sign2) values(:ptype,:id,:sign);
when SQLCODE -803 do
begin
if(:signno=1) then
update digilog set sign1=:sign where id=:id and ptype=:ptype;
else
update digilog set sign2=:sign where id=:id and ptype=:ptype;
end
end
Riho-Rene Ellermaa
senior programmer