我有一张照片是BLOG类型的,我在ORACLE存储过程是这样写的,我是通过数据链传送到另一个数据库的,但BLOG格式的传送过去有问题. 我X前台的图片格式是存储是这样写的 TBlobField(dsbZPXX1.DataSet.FieldByName('TXSJ')).SaveToFile(strTempFile);
with TStoredProc.Create(nil) do
try
ConnectionString := SYSFUNCLib.TFunDataSet.YWGLConnection;
StoredProcName := 'SP_ISTTP';
Params.ParamByName('V_TXSJ').LoadFromFile(strTempFile,TFieldType.ftBlob);
create or replace procedure SP_ISTTP(V_RYID VARCHAR2,
V_XH char, V_FILENAME VARCHAR2,
V_TXSJ BLOB,
V_XP_SCSJ Date,
V_LR_DWDM VARCHAR2,
V_LRR VARCHAR2,
V_LRSJ date) is
ls_errmsg varchar2(200);
li_count number;
begin
if v_txsj is null then
li_count := 0;
end if;
--1、取得参数值
begin
INSERT INTO T_TEMP_ZTRY_ZP
(RYID, XH, FILENAME, ATTCH, XP_SCSJ, LR_DWDM, LRR, LRSJ)
VALUES
(V_RYID,
V_XH,
V_FILENAME,
V_TXSJ,
V_XP_SCSJ,
V_LR_DWDM,
V_LRR,
V_LRSJ);
exception
when others then
ls_errmsg := sqlerrm;
end;
INSERT INTO ZTRY_ZP@TO_29XZ
SELECT * FROM T_TEMP_ZTRY_ZP; |