Matlab data type inconsistence for cursor.data when running matlab code in MCR and Matlab studio

2 visualizaciones (últimos 30 días)
I have a piece of matlab code below which reads data from a table. When I run this code in Matlab studio, the cursor.data type is cell array. But when I use my Java code to run this code in MCR, the cursor.data type is double array. My Matlab Studio version is 2012a. My MCR version now is 2011b. I'm trying to upgrade my MCR version to 2012a. Besides the possible version issue, does anybody know other possible reason which causes this issue? Thanks!
cur = exec(conn, ['SELECT CAST(Customer_Key AS NUMERIC(38,6)), CAST(Product_Key AS NUMERIC(38,6)), Spend FROM ' inputTable]); cursor = fetch(cur);

Respuestas (1)

owr
owr el 25 de Jun. de 2012
I no longer have access to the database toolbox, but it sounds like it could be related to the preference you have set for the "DataReturnFormat". Check in your code to see if you are calling "setdbprefs" or something similar:

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by