Maarten Bellekens
Member
Hi,
I've made a simple application (Oracle 10, Delphi 7) but having problems updating CLOB fields via an update qry.
I have created a table:
CREATE TABLE TBL_001
( TBL1_SEQ NUMBER(8,0),
FLD_MEM CLOB
, CONSTRAINT PBL1_PK PRIMARY KEY
(
TBL1_SEQ
)
)
And an application with
TOracleDataSet( qry_DTSTbl1).SQL:
select
*
from
TBL_001
and
TOracleQuery( qry_Insert).SQL:
insert into TBL_001(
TBL1_SEQ
, FLD_MEM)
values(
TBL1_SEQ1.NEXTVAL
, :FLD_MEM)
and following Event:
procedure Tfrm_UpdateQry.qry_DTSTbl1ApplyRecord(Sender: TOracleDataSet;
Action: Char; var Applied: Boolean; var NewRowId: String);
begin
case Action of
'I' :
begin
Sender.DeclareQueryVariables( qry_Insert);
qry_Insert.Execute;
end;
else
begin
Applied := True;
end;
end;
end;
I 've tried to with persistent fields/variables etc. but whenever I try to insert a new record I get the errormessage: "LOB variable :FLD_MEM cannot be nil.".
Has anybody an idea what I 'm doing wrong?
Thx,
Maarten Bellekens.
I've made a simple application (Oracle 10, Delphi 7) but having problems updating CLOB fields via an update qry.
I have created a table:
CREATE TABLE TBL_001
( TBL1_SEQ NUMBER(8,0),
FLD_MEM CLOB
, CONSTRAINT PBL1_PK PRIMARY KEY
(
TBL1_SEQ
)
)
And an application with
TOracleDataSet( qry_DTSTbl1).SQL:
select
*
from
TBL_001
and
TOracleQuery( qry_Insert).SQL:
insert into TBL_001(
TBL1_SEQ
, FLD_MEM)
values(
TBL1_SEQ1.NEXTVAL
, :FLD_MEM)
and following Event:
procedure Tfrm_UpdateQry.qry_DTSTbl1ApplyRecord(Sender: TOracleDataSet;
Action: Char; var Applied: Boolean; var NewRowId: String);
begin
case Action of
'I' :
begin
Sender.DeclareQueryVariables( qry_Insert);
qry_Insert.Execute;
end;
else
begin
Applied := True;
end;
end;
end;
I 've tried to with persistent fields/variables etc. but whenever I try to insert a new record I get the errormessage: "LOB variable :FLD_MEM cannot be nil.".
Has anybody an idea what I 'm doing wrong?
Thx,
Maarten Bellekens.