필터 지우기
필터 지우기

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
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 CenterFile Exchange에서 Database Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by