oracle Blob处理

--读
TempSql.SQL.Add('Select rptblob from RPTDEF where bianh = :bianh ');
TempSql.ParamByName('bianh').AsString := '8061';
TempSql.Open;
TBlobField(TempSql.FieldByName('rptblob')).SaveToFile('8061.fr3');

--插入、更新

insSql.SQL.Add('INSERT INTO RPTDEF (BIANH, RPTBLOB) VALUES (:BIANH, EMPTY_BLOB()) RETURNING RPTBLOB INTO :RPTBLOB');

Update RPTDEF set rptblob = EMPTY_BLOB() where bianh = :bianh Returning RptBlob Into :RptBlob

 

insSql.ParamByName('rptblob').ParamType := ptInput; 

insSql.ParamByName('rptblob').AsOraBlob.LoadFromFile(AppPath);

 

posted @ 2019-11-30 10:58  绿水青山777  阅读(1091)  评论(0编辑  收藏  举报