Board index » delphi » using tdbimage with sql serveur ?

using tdbimage with sql serveur ?

I was using in interbase server a blob file
with delphi tdbimage it was working very well

now i try to do same thing with SQL Serveur 6.5

and when delphi post my data with the fiel image empty
delphi don't put the field at null so i have this error

Erreur SQL gnrale
Must attach a value to the binary prefix 'Ox'; zero-length binary value is
not allowed

thank you to give me an help

 

Re:using tdbimage with sql serveur ?


Hello Xavier,

This works for us:

   function ImageToCDSBlob( img:TImage; fld:TBlobField; cds:TClientDataSet )
: boolean;
   begin
      with cds do
      begin
         Open;
         FetchBlobs;
         Edit;
         fld.Assign(AImage.Picture);
         Post;
      end;
   end;

    Tom

---------------------------------------------------------------------

Quote
xavier lemaire <xavier.lema...@winch-consultants.fr> wrote in message

news:94hrp5$8814@bornews.inprise.com...
Quote

> I was using in interbase server a blob file
> with delphi tdbimage it was working very well

> now i try to do same thing with SQL Serveur 6.5

> and when delphi post my data with the fiel image empty
> delphi don't put the field at null so i have this error

> Erreur SQL gnrale
> Must attach a value to the binary prefix 'Ox'; zero-length binary value is
> not allowed

> thank you to give me an help

Other Threads