Matlab data type inconsistence for cursor.data when running matlab code in MCR and Matlab studio
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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);
1 comentario
Walter Roberson
el 25 de Jun. de 2012
Note: you need to use the same version of MCR as the code was compiled with.
Respuestas (1)
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:
0 comentarios
Ver también
Categorías
Más información sobre Database Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!