Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Datenbanken (https://www.delphipraxis.net/15-datenbanken/)
-   -   Delphi Frage zu Firebird Blob und Image (https://www.delphipraxis.net/116502-frage-zu-firebird-blob-und-image.html)

Grolle 1. Jul 2008 15:46

Re: Frage zu Firebird Blob und Image
 
Binary bzw. 0

Viele Grüße ....

Grolle 16. Jul 2008 11:42

Re: Frage zu Firebird Blob und Image
 
Hi,

also mit dem folgenden Source bekomme ich jetzt keine Fehlermeldung mehr,
aber das Bild ist auch nicht in der Datenbank vorhanden?:
Delphi-Quellcode:
  ContactsQuery.ParamByName('P31').AsInteger := 3;
  ContactsQuery.ParamByName('P32').AsBlob := main.Memo1.Text;
  if main.Image3 <> nil then
  begin
    img := TJPEGImage.Create;
    img.Assign(main.Image3.Picture.Bitmap);
    s := TMemoryStream.Create;
    img.SaveToStream(s);
    s.Position := 0;
    ContactsQuery.ParamByName('P33').LoadFromStream(s, ftBlob);
    FreeAndNil(img);
    FreeAndNil(s);
  end;
  ContactsQuery.ExecSQL;
Fragende Grüße ...

mikhal 16. Jul 2008 15:38

Re: Frage zu Firebird Blob und Image
 
Hast du mal versucht, einen Breakpoint zu setzen und getestet, ob deine if-Bedingung überhaupt greift?

Grüße
Mikhal

PS: Hat TJpegImage überhaupt eine Bitmap?

Grolle 16. Jul 2008 20:14

Re: Frage zu Firebird Blob und Image
 
Hallo,

es klappt jetzt. Eine kurze Frage noch:
Delphi-Quellcode:
    img := TJPEGImage.Create;
img.Assign(main.Image3.Picture.Graphic);
Kann ich mit img.Assign jedes Bild bzw. jeden Bildtyp aus einem TImage laden?


Alle Zeitangaben in WEZ +1. Es ist jetzt 03:48 Uhr.
Seite 2 von 2     12   

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz