Database Toolbox |
Retrieving BINARY and OTHER Java Data
The Database Toolbox supports the data types listed in Data Types with no data manipulation required. You can also import BI
NARY
and OTHE
R
Java SQL objects, such as bitmap images. The process for importing BINARY
and OTHER
Java objects differs from the standard VQB import process in these ways:
OTHER
data type, the returned data is sometimes empty because Java does not always successfully pass it through the JDBC/ODBC bridge.
Retrieving Images in Data
This example uses the SampleDB
data source and a sample file for parsing image data, $matlabroot/toolbox/database/vqb/parsebinary.
m. For more information about the data source, see Setting Up a Data Source.
cellarray
or structure
.
A
as the MATLAB workspace variable and click Execute.
A
to view the contents.
A = [1] [21626x1 B[]] [2] [21626x1 B[]] [3] [21722x1 B[]] [4] [21626x1 B[]] [5] [21626x1 B[]] [6] [21626x1 B[]] [7] [21626x1 B[]] [8] [21626x1 B[]] [9] [21626x1 B[]]
The data in column 2
of the imported data, [21626x1 B[]]
, indicates that the data type is BINARY
.
photo
. Type
parsebinary
, which will display photo
as a bitmap image.
The parsebinary
M-file writes the retrieved data to a file, strips ODBC header information, and displays a bitmap image. For more details, type help parsebinary
or view the parsebinary
M-file in the MATLAB Editor by typing open parsebinary
.
This is just one example of retrieving a BINARY
object. Your application might require different manipulations to process the data in MATLAB.
Other Features in Advanced Query Options | Exporting Data Using the VQB |
© 1994-2005 The MathWorks, Inc.