Subject | Blob problem in SP |
---|---|
Author | Riho-Rene Ellermaa |
Post date | 2003-05-02T10:20:35Z |
Looks like the 1. May celebrations got the previous mail to be lost somewere.
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? I'm using FB 1.0.
If I just run
update digilog set sign1=:sign where id=:id and ptype=:ptype;
within procedure (commenting other lines out) then it works?!?
My code:
CREATE 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
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? I'm using FB 1.0.
If I just run
update digilog set sign1=:sign where id=:id and ptype=:ptype;
within procedure (commenting other lines out) then it works?!?
My code:
CREATE 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