フィルターのクリア

database toolbox: SQL Query on datatype "image" is limited to 8000 1Byte values

1 回表示 (過去 30 日間)
Walter Hipp
Walter Hipp 2017 年 3 月 21 日
コメント済み: Joe Kleespies 2017 年 8 月 25 日
In matlab Version 7.0 (2016b) it was possible to make a query on Image datatype in SQL for more then 8000 1Byte values. Now in matlab Version 7.1 (2017a) the queryresult is limited to the first 8000 values. In ver7.0 the result was int8 in ver7.1 the result is uint8
For example there is a database called "LocalDB" with a table called "dbo.Test" and a field called "imagedatafield" with datatype image and one column with 11000 Byte values
code with matlab ver 7.0
setdbprefs('DataReturnFormat', 'structure');
conn = database('LocalDB','','');
SqlStr = ['SELECT imagedatafield FROM dbo.Test];
result = fetch(conn,SqlStr);
result.imagedatafield
ans =
java.lang.Object[][]:
[11000×1 int8]
code with matlab ver 7.1 (the same code on the same database as with ver 7.0)
setdbprefs('DataReturnFormat', 'structure'); conn = database('LocalDB','',''); SqlStr = ['SELECT imagedatafield FROM dbo.Test]; result = fetch(conn,SqlStr); result.imagedatafield
ans =
cell
[8000×1 uint8]
Is there a way to get all data of a datatype "Image" and not just the first 8000 ??

回答 (1 件)

Anoop Somashekar
Anoop Somashekar 2017 年 3 月 28 日
From 2017a onwards, JDBC-ODBC bridge interface was migrated to Native-ODBC interface. Native-ODBC interface is not equipped to deal with long data-types such as BLOB, TEXT, NVARCHAR(MAX), VARCHAR(MAX), IMAGE etc.There are certain technical limitations to support these data types in Native-ODBC interface therefore it was decided to limit the number of bytes per column to 8000 bytes for long types (including image types). This is a known limitation in Native-ODBC interface.
  3 件のコメント
Georgio Mazarin
Georgio Mazarin 2017 年 4 月 4 日
Solved, JDBC can.
Joe Kleespies
Joe Kleespies 2017 年 8 月 25 日
Georgio, can you describe how you were able to solve this problem with JDBC? Using the JDBC driver still limits the columns to 8000 bytes for me.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeDatabase Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by