Board index » delphi » 64K blob limit + BDE + ODBC + Oracle

64K blob limit + BDE + ODBC + Oracle

Hi

I wonder if anyone can help me with the following problem:

I have an Oracale database in which I need to save a blob whose size
exceeds 64K. What is strange is that if I save a blob that is smaller
than 64K then everything works fine. However, if I try to save a blob
larger than 64K I can only read back from the database (original size -
64K) ? For example if I save 66098 bytes then I can only read 562 bytes
back which appears to be exactly what is in the database! Has anyone
encoutered this problem before?

Any help is greatly appreciated.
Thanks in advance,
Paulo

Environment:
Delphi5
BDE 5.1
Oracle 8.1.5
Oracle ODBC driver, Blob size = 1000, blobs to cache = 1000
Blob type in database is of type LONG RAW.

Code( writing to database )
------------------------------
( my  SQL is =
UPDATE
 PROCESSES
SET
 GroupId=:GroupId,
 ProcessName=:ProcessName,
 ProcessType=:ProcessType,
 MachineName=:MachineName,
 IconName=:IconName,
 Author=:Author,
 CreationDate=:CreationDate,
 Summary=:Summary,
 Notes=:Notes,
 Core=:Core,
 PosX=:PosX,
 PosY=:PosY
WHERE
 ProcessId=:ProcessId;

Quote
}

Pascal code:
------------
with qryUpdateProcessTemplate do
      begin
        try
          ParamByName( 'GroupId').Value := pGroupId;
          ParamByName( 'ProcessId').Value := pProcessTemplate.DbId;
          ParamByName( 'ProcessType').Value :=
pProcessTemplate.ProcessType;
          ParamByName( 'ProcessName').Value := pProcessTemplate.Name;
          ParamByName( 'MachineName').Value :=
pProcessTemplate.MachineName;
          ParamByName( 'IconName').Value :=
pProcessTemplate.PictureName;
          ParamByName( 'Author').Value := pProcessTemplate.Author;
          ParamByName( 'CreationDate').Value := TDateTime(
pProcessTemplate.Date );
          ParamByName( 'Summary').Value := pProcessTemplate.Summary;
          ParamByName( 'Notes').Value := pProcessTemplate.Notes;
          ParamByName( 'Core' ).SetBlobData(lCoreStream.Memory,
lCoreStream.Size);
          ParamByName( 'PosX' ).Value := pProcessTemplate.Posn.X;
          ParamByName( 'PosY' ).Value := pProcessTemplate.Posn.Y;
          ExecSQL;
          Result := DB_WRITE_SUCCESS;

        except
          Result := DB_WRITE_FAIL;
          Inc( lRetries );
        end;
      end; {with qryUpdateProcessTemplate}

 

Re:64K blob limit + BDE + ODBC + Oracle


Hi!

 Make sure that in bde configuration utility (BDE Administrator) you set the
parameter

BLOB SIZE to something bigger than 64 (64K)

Quote
Paulo wrote in message <3AFA76A7.4EDB0...@techprt.co.uk>...
>Hi

>I wonder if anyone can help me with the following problem:

>I have an Oracale database in which I need to save a blob whose size
>exceeds 64K. What is strange is that if I save a blob that is smaller
>than 64K then everything works fine. However, if I try to save a blob
>larger than 64K I can only read back from the database (original size -
>64K) ? For example if I save 66098 bytes then I can only read 562 bytes
>back which appears to be exactly what is in the database! Has anyone
>encoutered this problem before?

>Any help is greatly appreciated.
>Thanks in advance,
>Paulo

>Environment:
>Delphi5
>BDE 5.1
>Oracle 8.1.5
>Oracle ODBC driver, Blob size = 1000, blobs to cache = 1000
>Blob type in database is of type LONG RAW.

>Code( writing to database )
>------------------------------
>( my  SQL is =
>UPDATE
> PROCESSES
>SET
> GroupId=:GroupId,
> ProcessName=:ProcessName,
> ProcessType=:ProcessType,
> MachineName=:MachineName,
> IconName=:IconName,
> Author=:Author,
> CreationDate=:CreationDate,
> Summary=:Summary,
> Notes=:Notes,
> Core=:Core,
> PosX=:PosX,
> PosY=:PosY
>WHERE
> ProcessId=:ProcessId;
>}

>Pascal code:
>------------
>with qryUpdateProcessTemplate do
>      begin
>        try
>          ParamByName( 'GroupId').Value := pGroupId;
>          ParamByName( 'ProcessId').Value := pProcessTemplate.DbId;
>          ParamByName( 'ProcessType').Value :=
>pProcessTemplate.ProcessType;
>          ParamByName( 'ProcessName').Value := pProcessTemplate.Name;
>          ParamByName( 'MachineName').Value :=
>pProcessTemplate.MachineName;
>          ParamByName( 'IconName').Value :=
>pProcessTemplate.PictureName;
>          ParamByName( 'Author').Value := pProcessTemplate.Author;
>          ParamByName( 'CreationDate').Value := TDateTime(
>pProcessTemplate.Date );
>          ParamByName( 'Summary').Value := pProcessTemplate.Summary;
>          ParamByName( 'Notes').Value := pProcessTemplate.Notes;
>          ParamByName( 'Core' ).SetBlobData(lCoreStream.Memory,
>lCoreStream.Size);
>          ParamByName( 'PosX' ).Value := pProcessTemplate.Posn.X;
>          ParamByName( 'PosY' ).Value := pProcessTemplate.Posn.Y;
>          ExecSQL;
>          Result := DB_WRITE_SUCCESS;

>        except
>          Result := DB_WRITE_FAIL;
>          Inc( lRetries );
>        end;
>      end; {with qryUpdateProcessTemplate}

Other Threads