Matlab data type inconsistence for cursor.data when running matlab code in MCR and Matlab studio
1 view (last 30 days)
Show older comments
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 Comment
Walter Roberson
on 25 Jun 2012
Note: you need to use the same version of MCR as the code was compiled with.
Answers (1)
owr
on 25 Jun 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 Comments
See Also
Categories
Find more on Database Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!