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'
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Database Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!