Главная страница | назад





Article #27166: Assigning an Oracle BLOB greater than 32K must be done using AsMemo

If you create a table as such:

create table foo
(f1 int not null,
f2 long)

then insert data such as:

insert into foo values (:1, :2)

when assigning values to the second parameter you must the AsMemo property. Failing to do this may result in an Access Violation in SQLORA32.DLL at 4D629F73.

Example:

var
s : string;
counter : integer;
begin
s := '';
for counter := 1 to 32768 do
s := s + 'A';
with Query1 do
begin
Params[0].Value := 1;
//Params[1].Value := s; //This will cause an AV when ExecSQL is executed.
//Params[1].AsString := s; //This will cause an AV when ExecSQL is executed.
//Params[1].AsBlob := s; //Generates Oracle Error
Params[1].AsMemo := s;
ExecSQL;
end;

Last Modified: 10-APR-01