how to put an image into blob field
i use oralce database and want to store an image into blob field. But it
tell me
ora-22275 error,invalid lobs locator. Please help me.
program:
with dmlMain.qurMain do
begin
Close;
SQL.Clear;
SQL.Add('INSERT into z_zwyt (xm,sfz,zwyt) VALUES(:p_xm,:p_sfz,
EMPTY_BLOB())');
ParamByName('p_xm').AsString := 'jk';
ParamByName('p_sfz').AsString := '420102197707283011';
ExecSQL;
SQL.Clear;
SQL.Add('update z_zwyt set zwyt =:p_zwyt where xm = :p_xm and
sfz = :p_sfz');
ParamByName('p_xm').AsString := 'jk';
ParamByName('p_sfz').AsString := '420102197707283011';
ParamByName('p_zwyt').loadfromfile('tt.bmp',ftOraBlob);
ExecSQL;
end;
the structure of table z_zwyt:
create table Z_ZWYT (
XM VARCHAR2(30) not null,
SFZ CHAR(18) not null,
ZWYT BLOB not null,
constraint PK_Z_ZWYT primary key (SFZ, XM)
)