Loading while post or retrieve large BLOB field, HOW ?
Loading while post or retrieve large BLOB field, HOW ?
I have BLOB field about 15 Megs per field which want to be stored/retrieved via client/server application. My user wants :
1. Information on how much the stream has been stored/retrieved during the process (like progress bar, or something)
2. Cancel progress (in case the user feel the progress is too long, he can cancel the process)
Is that possible to do with uniDAC ?
Regards,
Eldi Munggaran
ps.
I'm sorry if I have posted on wrong thread here :
http://devart.com/forums/viewtopic.php?p=44579#44579
I repost here my question (for uniDAC, not pgDAC) :
1. Information on how much the stream has been stored/retrieved during the process (like progress bar, or something)
2. Cancel progress (in case the user feel the progress is too long, he can cancel the process)
Is that possible to do with uniDAC ?
Regards,
Eldi Munggaran
ps.
I'm sorry if I have posted on wrong thread here :
http://devart.com/forums/viewtopic.php?p=44579#44579
I repost here my question (for uniDAC, not pgDAC) :
UniDAC loads BLOB value as one operation. You cannot display its progresst. But loading one BLOB value should be fast. So progress bar is not required.
You can display progress on reading BLOB value. Set the CacheLobs specific option of Oracle provider to False for the TUniQuery component. In this case TUniQuery does not reads BLOB value when you open the query. You can read BLOB value in your code (add MemData unit to USES):
You can display progress on reading BLOB value. Set the CacheLobs specific option of Oracle provider to False for the TUniQuery component. In this case TUniQuery does not reads BLOB value when you open the query. You can read BLOB value in your code (add MemData unit to USES):
Code: Select all
const
BlockSize = $F000;
var
Blob: TBlob;
Buffer: array of byte;
p: pointer;
Pos, Count: integer;
begin
UniQuery1.Open;
Blob := UniQuery1.GetBlob('f_blob');
SetLength(Buffer, Blob.Size);
ProgressBar.Position := 0;
Application.ProcessMessages;
Pos := 0;
p := Buffer;
repeat
Count := Blob.Read(Pos, BlockSize, p);
ProgressBar.Position := Round(Pos/Blob.Size * 100);
Application.ProcessMessages;
Pos := Pos + Count;
p := Pointer(Integer(p) + Count);
until Count < BlockSize;
end;