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 ORACLE DB auslesen

Empfohlene Antworten

Veröffentlicht

:confused: Ich habe es geschafft mit PHP und einer Oracle DB Dateien in einen BLOB zu schreiben.

Leider bekomme ich den Rückweg nicht hin. Kann also bis jetzt keine Dateien auslesen.

Es gibt zwar OCI-Funktionen, die sind aber noch nicht present bzw. haben noch keinen Funktion.

WER KANN MIR HELFEN???

Ich weiß, dass der Zugriff in Java auf BLOB Felder ein wenig komplizierter ist als auf "normale" Felder. Statt "getString()" und "getInteger()" aufzurufen, die den Wert eines alphanumerischen bzw. eines numerischen Feldes zurückliefern, muss ein Stream ausgelesen werden (ich kenne den Methodennamen jetzt nicht so genau), der anschließend als String dargestellt werden kann.

Vielleicht hilft dir das ja weiter.

:D Danke, nur leider muß ich das Problem mit PHP lösen.

Versuch's mal hiermit. Das hatte ich hier noch irgendwo rumfliegen. DB auf und zu habe ich mal weggelassen.

function getLob($SQL="NIX")

{

if($SQL !="NIX")

{

$this->setStatement($SQL);

}

if($this->st)

{

OCIExecute($this->st);

OCIFetch($this->st);

$bdatalob=OCIResult($this->st, 1);

if($bdatalob)

{

$bdata=$bdatalob->load();

return $bdata;

}

else

{

$this->ERROR = "Fatal: no data";

return false;

}

}

else

{

$this->ERROR = "Fatal: No Statement set";

return false;

}

}

switch(strtoupper($filetype))

{

case "PDF":

header("Content-Type: application/pdf");

break;

case "DOC":

header("Content-Type: application/msword");

break;

}

$SQL="SELECT data FROM t_document WHERE id='".$id."'";

$st = $db->setStatement($SQL);

$result=$db->getLob();

if($result)

{

echo $result;

}

else

{

echo "Das Dokument konnte nicht gefunden werden.";

}

thanks fuer die links. hab das auch noch gesucht. :)

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.