Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Datenbanken (https://www.delphipraxis.net/15-datenbanken/)
-   -   Delphi UIB Komponenten und BLOB Felder (https://www.delphipraxis.net/99700-uib-komponenten-und-blob-felder.html)

GuenterS 16. Sep 2007 11:19

Datenbank: FireBird • Version: 1.5 • Zugriff über: UIB

UIB Komponenten und BLOB Felder
 
Hallo,

gerade sitze ich wieder daran weil ich einen Datensatz in die Firebird Datenbank einfügen möchte und bekomme die Meldung, dass Blob Felder nicht unterstützt würden.


Wie ändert man denn normalerweise den Inhalt eines Blob-Feldes?

Delphi-Quellcode:
  with TJvUIBquery.Create(nil) do
  try
    DataBase := dmIntern.InternDB;
    Transaction := dmIntern.IBTransaction;
    SQL.Text := 'INSERT INTO kontakte (K_KONTAKTEID, ADRESSENID, ANSPRECHPARTNERID, '
      + ' K_DATUMK, K_BEREICH, K_FEHLERKLASSE, K_ABGESCHLOSSEN, K_EIN_AUS, K_PUBLIC_PRIVATE, '
      + ' K_ANLAGEN, PR_PRODUKTEID, KA_KONTAKTARTID, K_GELOESCHT, K_ZEIT, '
      + ' K_VERRECHNET, TODO_SYSID, K_DRINGLICHKEIT_STR, K_UNTERBEREICH, ST_STATUSID, '
      + ' K_KBESCHREIBUNG) '
      + ' VALUES(:K_KONTAKTEID, :ADRESSENID, :ANSPRECHPARTNERID, '
      + ' :K_DATUMK, :K_BEREICH, :K_FEHLERKLASSE, :K_ABGESCHLOSSEN, :K_EIN_AUS, :K_PUBLIC_PRIVATE, '
      + ' :K_ANLAGEN, :PR_PRODUKTEID, :KA_KONTAKTARTID, :K_GELOESCHT, :K_ZEIT, '
      + ' :K_VERRECHNET, :TODO_SYSID, :K_DRINGLICHKEIT_STR, :K_UNTERBEREICH, :ST_STATUSID, '
      + ' :K_KBESCHREIBUNG)';

    Params.ByNameAsInteger['K_KONTAKTEID'] := lKID;
    Params.ByNameAsString['ADRESSENID'] := GetComboBoxID(ComboKunde, ComboKunde.ItemIndex);
    Params.ByNameAsString['ANSPRECHPARTNERID'] := GetComboBoxID(ComboAnsp, ComboAnsp.ItemIndex);
    Params.ByNameAsDateTime['K_DATUMK'] := now;
    Params.ByNameAsString['K_BEREICH'] := GetComboBoxID(ComboBereich, ComboBereich.ItemIndex);
    Params.ByNameAsString['K_FEHLERKLASSE'] := GetComboBoxID(ComboTODO, ComboTODO.ItemIndex);
    Params.ByNameAsInteger['K_ABGESCHLOSSEN'] := 0;
    Params.ByNameAsInteger['K_EIN_AUS'] := 0;
    Params.ByNameAsInteger['K_PUBLIC_PRIVATE'] := 0;
    Params.ByNameAsInteger['K_ANLAGEN'] := 0;
    Params.ByNameAsString['PR_PRODUKTEID'] := GetComboBoxID(ComboPRodukt, ComboProdukt.ItemIndex);
    Params.ByNameAsString['KA_KONTAKTARTID'] := GetComboBoxID(ComboKontaktart, ComboKontaktArt.ItemIndex);
    Params.ByNameAsInteger['K_GELOESCHT'] := 0;
    Params.ByNameAsDateTime['K_ZEIT'] := now;
    Params.ByNameAsInteger['K_VERRECHNET'] := 0;
    Params.ByNameAsString['TODO_SYSID'] := GetComboBoxID(ComboTodo, ComboTodo.ItemIndex);
    Params.ByNameAsString['K_DRINGLICHKEIT_STR'] := ComboDringlichkeit.Text;
    Params.ByNameAsString['K_UNTERBEREICH'] := Edit1.Text;
    Params.ByNameAsString['ST_STATUSID'] := GetComboBoxID(ComboStatus, ComboStatus.ItemIndex);
    Params.ByNameAsString['K_KBESCHREIBUNG'] := Memo1.Lines.Text;
    ExecSQL;


  finally
    Free;
  end;
So versuche ich es zur Zeit ... leider kommt folgende Fehlermeldung.

Zitat:

---------------------------
Benachrichtigung über Debugger-Exception
---------------------------
Im Projekt todoXP.exe ist eine Exception der Klasse EUIBError mit der Meldung 'Dynamic SQL Error
SQL error code = -303
feature is not supported
BLOB and array data types are not supported for move operation
can't format message 13:697 -- message file F:\d7\bin\firebird.msg not found
Error Code: 249' aufgetreten.
---------------------------
Anhalten Fortsetzen Hilfe
---------------------------

marabu 16. Sep 2007 18:57

Re: UIB Komponenten und BLOB Felder
 
Hallo Günter,

versuche es so:

Delphi-Quellcode:
begin
  with TJvUIBquery.Create(nil) do
  try
    // ...
    ParamsSetBlob('K_KBESCHREIBUNG', Memo1.Text);
    ExecSQL;
  finally
    Free;
  end;
Freundliche Grüße

GuenterS 16. Sep 2007 21:07

Re: UIB Komponenten und BLOB Felder
 
Hallo Achim!


Danke, ParamsSetBlob hat mich gerettet. :)


Alle Zeitangaben in WEZ +1. Es ist jetzt 21:03 Uhr.

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