Question on partial CLOB read from query field.
Posted: Fri 06 Apr 2007 19:25
Hi Folks!
Is it possible to read the initial say 100 bytes of a CLOB or BLOB? I'm trying to do something along the lines of:
Query.Options.DeferredLobRead := False;
Query.Options.CacheLobs := True;
Query.SQL.Text := 'select myclob from mytable where id = 1';
Query.Execute;
if not Query.EOF then
begin
// read 100 bytes into field's value such that it will
// not read the full information from the server,
// I'd like to cache it in the dataset so it isn't re-read later.
end;
I've tried a few things but so far haven't got it to work. Any suggestions greatly appreciated!
-Mark
Is it possible to read the initial say 100 bytes of a CLOB or BLOB? I'm trying to do something along the lines of:
Query.Options.DeferredLobRead := False;
Query.Options.CacheLobs := True;
Query.SQL.Text := 'select myclob from mytable where id = 1';
Query.Execute;
if not Query.EOF then
begin
// read 100 bytes into field's value such that it will
// not read the full information from the server,
// I'd like to cache it in the dataset so it isn't re-read later.
end;
I've tried a few things but so far haven't got it to work. Any suggestions greatly appreciated!
-Mark