Blob parameters in direct mode?
Blob parameters in direct mode?
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
I just sent an example. Hope that helps solving the problem.Plash wrote:OCISvcCtx can be used in the Direct mode. We could not reproduce the problem. Please send to odac*devart*com a complete small sample that demonstrates the problem, including the script for creating database objects.
Regards,
dhalek