BLOB parameters - how do I use them?
BLOB parameters - how do I use them?
Hi there,
I'm trying an INSERT INTO statement with a blob.
When trying LoadFromStream on the parameter it just hangs.
When trying AsBlob - I get all sorts of messages, like "bloblocator needs to be inited" etc etc...
In short:
How do I use BLOB parameters?
--
Martijn Tonies
Upscene Productions
I'm trying an INSERT INTO statement with a blob.
When trying LoadFromStream on the parameter it just hangs.
When trying AsBlob - I get all sorts of messages, like "bloblocator needs to be inited" etc etc...
In short:
How do I use BLOB parameters?
--
Martijn Tonies
Upscene Productions
Hmmm, using the EMPTY_LOB functions is not an option -- this code is generic for multiple database engines. I would expect ODAC to do this for me.
I tried:
(FCommand = TOraSQL)
But this raises the error:
"Function is not supported"
This raises Access Violations:
Switching the "Init" and "AllocLob" around raises:
"OraLob needs to be inited"
??
--
Martijn Tonies
Upscene Productions
I tried:
(FCommand = TOraSQL)
Code: Select all
FCommand.Params[Index].AsOraBlob.CreateTemporary(ltBLOB);
ss := TStringStream.Create(Value);
try
FCommand.Params[Index].AsOraBlob.LoadFromStream(ss);
//FCommand.Params[Index].LoadFromStream(ss, ftOraBLOB);
finally
ss.Free;
end;
"Function is not supported"
This raises Access Violations:
Code: Select all
FCommand.Params[Index].AsOraBlob.Init;
FCommand.Params[Index].AsOraBlob.AllocLob;
//FCommand.Params[Index].AsOraBlob.CreateTemporary(ltBLOB);
ss := TStringStream.Create(Value);
try
FCommand.Params[Index].AsOraBlob.LoadFromStream(ss);
//FCommand.Params[Index].LoadFromStream(ss, ftOraBLOB);
finally
ss.Free;
end;
"OraLob needs to be inited"
??
--
Martijn Tonies
Upscene Productions
Aaargh...
"yet another issue with the NET option"
Will it ever have this functionality?
I'm beginning to think I should remove the NET functionality from my application as I keep running into issues there...
I'll say, the NET option doesnt' "work as advertised" to me :-/
--
Martijn Tonies
Upscene Productions

"yet another issue with the NET option"
Will it ever have this functionality?
I'm beginning to think I should remove the NET functionality from my application as I keep running into issues there...
I'll say, the NET option doesnt' "work as advertised" to me :-/
--
Martijn Tonies
Upscene Productions
We will implement CreateTemporary function for Net connection in the next ODAC build. The next is valid for OCI mode and the next build of ODAC with Oracle 9i.
Code: Select all
//INSERT INTO LOB_TYPES
// (ID, F_BLOB)
//VALUES
// (:ID, :F_BLOB)
FCommand.Params[Index].ParamType := ptInput;
FCommand.Params[Index].AsOraBlob.OCISvcCtx := OraSession1.OCISvcCtx;
FCommand.Params[Index].AsOraBlob.CreateTemporary(ltBlob);
ss := TStringStream.Create(Value);
try
FCommand.Params[Index].AsOraBlob.LoadFromStream(ss);
FCommand.Params[Index].AsOraBlob.WriteLob;
finally
ss.Free;
end;
FCommand.Execute;