필터 지우기
필터 지우기

Database toolbox difference 2014a vs 2016b

조회 수: 2 (최근 30일)
Robert Vullings
Robert Vullings 2016년 11월 29일
댓글: Robert Vullings 2016년 11월 29일
Hi all,
I have a question about the way the data is fetched from the database. I am working on a project that involves a lot of DB querying. For years the project has run fine on 2014a (Database Toolbox 5.1). Now we are testing switching to 2016b (Database Toolbox 7.0), but we are experiencing some issues.
The problem we have encountered is the way that boolean values are fetched from the DB. We are running an MS SQLServer DB, where boolean values are stored in a bit column. In 2014a, when fetching these, it returns a cell array with logical values. Now, it returns a logical array.
Problems occur when indexing the data. We should then use [] instead of {}. Given the size of the project, 150k+ lines of code with many of these calls, changing all these indexings will take a lot of time. I was wondering if more people experienced this, and whether you have come up with a solution to the problem.
Thank you in advance.
Kind regards,
Robert

답변 (1개)

the cyclist
the cyclist 2016년 11월 29일
편집: the cyclist 2016년 11월 29일
I don't remember having the equivalent problem (but I am using Postgres, so maybe there's a difference there).
The only thing I can think of is checking the preferences in MATLAB --> Preferences --> Database Toolbox to see if "Return data / Data return format" is set to cellarray.
  댓글 수: 1
Robert Vullings
Robert Vullings 2016년 11월 29일
Thanks for pointing that out, haven't thought of that. Currently queries are returned as a struct, but within that struct, boolean fields are cell arrays with logicals in 2014a and logical arrays in 2016b.
Changing the output to cell array would have an even greater impact on the problem, I think.

댓글을 달려면 로그인하십시오.

카테고리

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