Retrieving Long Raw data from Oracle Database
Show older comments
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'
Accepted Answer
More Answers (0)
Categories
Find more on Database Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!