Board index » delphi » Invalid blob length in SQL Server 6.5

Invalid blob length in SQL Server 6.5

When I Inserting File in BLOB I receive 'Invalid blob length'.?!
BDE 5
SQL LINKS NATIVE
DELPHI 3/4
Look for HELP!

Small EXAMPLE:

procedure TForm1.Button1Click(Sender: TObject);
var i:Integer;
begin
Table1.Open;
for i:=0 to ListBox1.Items.Count-1 do
  if (Integer(ListBox1.Items.Objects[i])>0) then       // Size of MyFile
     begin
     Table1.Insert;
     Table1.FieldByName('NAME').AsString:=ListBox1.Items.Strings[i]; // Name
of MyFile
     (Table1.FieldByName('TEXT') as
TBlobField).LoadfromFile(ListBox1.Items.Strings [i]);  //  BLOB FIELD 'TEXT'
TYPE
     end;
Table1.Close;
end;

if FileSize>1000k I receive 'Invalid blob length'

--
Ivan Borissov Kojouharov
ikojuha...@bitex.com
iboris...@hotmail.com

 

Re:Invalid blob length in SQL Server 6.5


Quote
> if FileSize>1000k I receive 'Invalid blob length'

Make sure you define a unique clustered index on the table. Then your
inserts should go OK.

--
Marc Batchelor

Re:Invalid blob length in SQL Server 6.5


OK, but I have this sample table

field->Name->Type
1.unique clustered index,identity->ID->Integer
2 ->NAME->varchar(255)
3->TEXT->BLOB TEXT type

and again receive 'Invalid blob length'

--
Ivan Borissov Kojouharov
ikojuha...@bitex.com
iboris...@hotmail.com

Quote
Marc Batchelor wrote in message <361E3F01.98372...@nospam.magicnet.net>...
>> if FileSize>1000k I receive 'Invalid blob length'

>Make sure you define a unique clustered index on the table. Then your
>inserts should go OK.

>--
>Marc Batchelor

Re:Invalid blob length in SQL Server 6.5


Check your BLOB SIZE (in KB) entry in BDE cfg. You can increase it to handle
blobs of larger size.

T.Ramesh.

Quote
Ivan Borissov wrote:
> When I Inserting File in BLOB I receive 'Invalid blob length'.?!
> BDE 5
> SQL LINKS NATIVE
> DELPHI 3/4
> Look for HELP!

> Small EXAMPLE:

> procedure TForm1.Button1Click(Sender: TObject);
> var i:Integer;
> begin
> Table1.Open;
> for i:=0 to ListBox1.Items.Count-1 do
>   if (Integer(ListBox1.Items.Objects[i])>0) then       // Size of MyFile
>      begin
>      Table1.Insert;
>      Table1.FieldByName('NAME').AsString:=ListBox1.Items.Strings[i]; // Name
> of MyFile
>      (Table1.FieldByName('TEXT') as
> TBlobField).LoadfromFile(ListBox1.Items.Strings [i]);  //  BLOB FIELD 'TEXT'
> TYPE
>      end;
> Table1.Close;
> end;

> if FileSize>1000k I receive 'Invalid blob length'

> --
> Ivan Borissov Kojouharov
> ikojuha...@bitex.com
> iboris...@hotmail.com

Other Threads