Retrieving Long Raw data from Oracle Database

I am trying to retrieve binary data from an Oracle database at another facility using the database toolbox. The connection works, and I can retrieve data of different types from the view provided. But when I query the binary data I get 'No Data'. The binary data is stored as Long Raw, which I realize is deprecated, but there is nothing I can do to change the stored format. I am currently connecting through Oracle Instant Client 11 using the 'thin' driver.
Is it possible to retrieve Long Raw data with the database toolbox? And if so, how?
Example code:
conn=database(dbSID,User,pwd,'Vendor','Oracle',...
'DriverType','thin','Server',url,...
'PortNumber',portnum);
sqlquery='SELECT raw_data'; % This is the column containing the binary data
sqlquery=[sqlquery,' FROM data']; % This is a special read-only view created for our facility to access
curs=exec(conn,sqlquery);
setdbprefs('DataReturnFormat','cellarray')
curs=fetch(curs);
close(curs);
close(conn);
This results in the following: (curs.Message is empty after both the exec and fetch function calls)
curs.Data
ans =
'No Data'

 Respuesta aceptada

Aaron Larson
Aaron Larson el 6 de Abr. de 2016

0 votos

I received the following information from Mathworks regarding this issue:
"This is a limitation of MATLAB 2015b in this scenario. In MATLAB R2016a, the FETCH algorithm is enhanced and now can handle importing of LONG RAW data."
After updating to 2016a, the above code successfully retrieved the binary data. So if anyone else has this problem, update to the latest Matlab version.

Más respuestas (0)

Preguntada:

el 23 de Feb. de 2016

Respondida:

el 6 de Abr. de 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by