Blob parameters in direct mode?
Posted: Mon 16 Mar 2009 10:44
Hello out there,
I have a stored procedure that has a blob parameter. I can call this using client mode without problems with this code
procedure TIWUserSession.SchreibeBlob(const dateiname: string);
var
b :TOraLob;
begin
b := TOraLob.Create(OraSession.OCISvcCtx);
b.CreateTemporary(ltBLob);
b.LoadFromFile(dateiname);
b.WriteLob;
with OraStoredProcBlobNachDir do
begin
ParamByName('B').AsOraBlob := b;
ParamByName('DIR').AsString := 'ELO_IMPORT';
ParamByName('DATEI').AsString := ExtractFileName(dateiname);
Execute;
ParamByName('B').AsOraBlob.FreeLob;
end;
OraSession.Commit;
b.Free;
end;
But when I use direct mode, I get an ORA-00600 [kkxlrd csid mismatch], [0], [178], [0], [1], [], [], []
I suspect OraSession.OCISvcCtx is not valid in direct mode. Now the question is, how do I call a stored procedure with a blob parameter in direct mode?
I'm using ODAC 6.70.0.44 with Delphi2009 and Oracle 10.2.0.4.
Many thanks in Advance,
dhalek
I have a stored procedure that has a blob parameter. I can call this using client mode without problems with this code
procedure TIWUserSession.SchreibeBlob(const dateiname: string);
var
b :TOraLob;
begin
b := TOraLob.Create(OraSession.OCISvcCtx);
b.CreateTemporary(ltBLob);
b.LoadFromFile(dateiname);
b.WriteLob;
with OraStoredProcBlobNachDir do
begin
ParamByName('B').AsOraBlob := b;
ParamByName('DIR').AsString := 'ELO_IMPORT';
ParamByName('DATEI').AsString := ExtractFileName(dateiname);
Execute;
ParamByName('B').AsOraBlob.FreeLob;
end;
OraSession.Commit;
b.Free;
end;
But when I use direct mode, I get an ORA-00600 [kkxlrd csid mismatch], [0], [178], [0], [1], [], [], []
I suspect OraSession.OCISvcCtx is not valid in direct mode. Now the question is, how do I call a stored procedure with a blob parameter in direct mode?
I'm using ODAC 6.70.0.44 with Delphi2009 and Oracle 10.2.0.4.
Many thanks in Advance,
dhalek