Board index » delphi » blob field

blob field

Hi!

Why don't you just try to "append" a null-character to the Image-field?
A null-character is equivalent to the result of Char(0).

It would be something like this:

1. Find the record where you want to delete the OLE Object-field.

2. Use the method called "AppendChunk" on the OLE Object-Field, and
simply Append one single byte with the value of zero.

example:

rs.Fields['Image'].AppendChunk(Byte(0), 1); { or something like that }

Hans Olav.

Quote
Pierpaolo Paparo wrote in message <38087869.1C3D2...@usa.net>...
>[Delphi 5.0]

>In Access I do
>fieldname                     Type
>ID                            Primary Key +Autoincrement
>image                 OLE Object
>etichetta                    text.

>I use TADOTable.
>this code doesn'not work properly
> TADoTable1.Edit;
> TAdoTable1.FieldByName('immagine').Clear;
> TADotabel1.Post;

>the Image is not delete. Why?

>The same code work properly with a TTable

> If I try to delete an image with thi code
> DBImage1.cutoclipboard;
> in a TAdoTable does not work.

>Could you help me?

 

Re:blob field


Quote

> rs.Fields['Image'].AppendChunk(Byte(0), 1); { or something like that }

The methods AppendChunk is not a method of A TField, but
is a method af a TParameter.
So your code don't work!

Re:blob field


Quote
Pierpaolo Paparo <aga...@usa.net> wrote in message

news:38087869.1C3D2F6A@usa.net...

Quote
> the Image is not delete. Why?

See the file BlobFieldClear.txt in the ADOExpress Updates folder of the URL:

http://briefcase.yahoo.com/bc/delphidb

Mark

Re:blob field


Quote
"Mark Edington (Borland)" wrote:

> See the file BlobFieldClear.txt in the ADOExpress Updates folder of the URL:

> http://briefcase.yahoo.com/bc/delphidb

I'm sorry Mark, but my code still not work.
I'have modified the VCL source Code.

 ImgCopertina.CutToClipBoard; //optionally
  TAlbum.Edit;
  TAlbum.FieldByName('Image').Clear; // or
TAlbum.FielsByName('image').AsString:='';
  TAlbum.post;
 end;
This code don't Work.!

Re:blob field


thank you!

Re:blob field


Quote
Pierpaolo Paparo <aga...@usa.net> wrote in message

news:380CD2C4.8EB8633D@usa.net...

Quote
> I'm sorry Mark, but my code still not work.
> I'have modified the VCL source Code.

Double check that you are using the patched source.  If that still doesn't solve
the problem can you email me a test case that demonstrates the problem?

Mark

Re:blob field


That's all right mark, Thanks
Quote
"Mark Edington (Borland)" wrote:
> Pierpaolo Paparo <aga...@usa.net> wrote in message
> news:380CD2C4.8EB8633D@usa.net...

> > I'm sorry Mark, but my code still not work.
> > I'have modified the VCL source Code.

> Double check that you are using the patched source.  If that still doesn't solve
> the problem can you email me a test case that demonstrates the problem?

> Mark

Other Threads