Borrar filtros
Borrar filtros

Database toolbox difference 2014a vs 2016b

3 visualizaciones (últimos 30 días)
Robert Vullings
Robert Vullings el 29 de Nov. de 2016
Comentada: Robert Vullings el 29 de Nov. de 2016
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

Respuestas (1)

the cyclist
the cyclist el 29 de Nov. de 2016
Editada: the cyclist el 29 de Nov. de 2016
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 comentario
Robert Vullings
Robert Vullings el 29 de Nov. de 2016
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.

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by