Quantcast
Channel: SCN : Discussion List - SAP on Oracle
Viewing all articles
Browse latest Browse all 1892

Reading BLOB in Native SQL from ABAP program

$
0
0

Hello,

 

I'm trying to read content of a BLOB field from a table with Native SQL in ABAP like this:

 

DATA: l_bytes type xstring.

EXEC SQL.

  SELECT bytes INTO :l_bytes FROM tablename

ENDEXEC.

 

But when I'm using xstring it returns only 32768 bytes. When using type x length 65000 for l_bytes it returns 65000 bytes, but x is limited to 65535 bytes only. So why it returns only 32768 bytes in direct sql? For DB2 I found note 610342 where you need to add \lob to the statement, I tried with Oracle but doesn't work.

 

DATA: CLOB_VAR TYPE STRING.

DATA: BLOB_VAR TYPE XSTRING.

EXEC SQL.     

  SELECT FCLOB, FBLOB FROM ZZTAB        INTO :CLOB_VAR\lob, :BLOB_VAR\lob

ENDEXEC.

 

Regards

Markus


Viewing all articles
Browse latest Browse all 1892

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>