Einzelnen Beitrag anzeigen

Benutzerbild von Jasocul
Jasocul

Registriert seit: 22. Sep 2004
Ort: Delmenhorst
1.338 Beiträge
 
Delphi 11 Alexandria
 
#2

Re: Update/insert CLOB Feld in Oracle (TLobLocator)

  Alt 2. Jun 2005, 11:24
Du solltest auf jeden Fall die Zeilen 9 und 10 vertauschen, da du erst die Daten Laden musst, bevor du diese dem Parameter zuweist.
Da ich selbst mit dem TLobLocator noch nicht gearbeitet habe, kann ich dir im Moment nicht mehr dazu sagen.

Habe nochmal in der Hilfe nachgesehen. Wenn du einen neuen Datensatz hast, kannst du eventuelle Probleme bekommen. Hier ein Auszug aus der Hilfe zum TLOBLocator:
Zitat:
When a LOB column contains a null value, the record does not contain a LOB Locator. Therefore, when selecting a null LOB, you cannot access the LOB data. When updating a null LOB, you first need to update the column to contain an empty LOB (which is something completely different than a null LOB) and use this newly created LOB Locator to write the actual data. When inserting a new record with LOB columns, the same mechanism applies. Temporary LOB's, created through the CreateTemporary constructor, do not have this limitation. You can create the LOB, write data to it, and subsequently use it for Inserts, Updates and PL/SQL calls.
Du hättest also Probleme bei Null-Werten in deiner Tabelle.
Peter
  Mit Zitat antworten Zitat