Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

BLOB aus PL/SQL füllen

Empfohlene Antworten

Veröffentlicht

Hi!

Ich möchte aus PL/SQL eine BLOB - Spalte füllen. Das Bild befindet sich im Verzeichnis c:\plsql und heisst bild.jpg. Dafür lege ich eine Tabelle Bilder mit einer id, der bezeichnung und dem BLOB - Feld selbst. Danach erstelle ich ein Directory, in dem die Datei steht:

CREATE DIRECTORY MYDIR AS 'c:\\plsql\\'; (Syntax korrekt?)

Anschliessend deklariere ich folgende Variablen:

DECLARE

Dest_loc BLOB; -- mein temporaeres BLOB

Src_loc BFILE := BFILENAME('MYDIR', 'bild.jpg');

Amount INTEGER; -- Groesse des Bildes

Danach die Quelle und Ziel öffnen, kopieren und wieder schliessen

DBMS_LOB.OPEN(Src_loc, DBMS_LOB.LOB_READONLY); -- Quelle

DBMS_LOB.OPEN(Dest_loc, DBMS_LOB.LOB_READWRITE); -- Ziel

DBMS_LOB.LOADFROMFILE(Dest_loc, Src_loc, Amount); -- kopieren

DBMS_LOB.CLOSE(Dest_loc); -- Ziel schliessen

DBMS_LOB.CLOSE(Src_loc); -- Quelle schliessen

Warum funktioniert das so nicht? Ist das Verzeichnis korrekt angegeben? Fehlermeldung: Datei nicht gefunden (oder so).

Danke im voraus

oanes

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.