Matlab data type inconsistence for cursor.data when running matlab code in MCR and Matlab studio
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaire
Walter Roberson
le 25 Juin 2012
Note: you need to use the same version of MCR as the code was compiled with.
Réponses (1)
owr
le 25 Juin 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 commentaires
Voir également
Catégories
En savoir plus sur Database Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!