Fetch command no longer works with Matlab 2016b
1 次查看(过去 30 天)
显示 更早的评论
Part of my code uses the fetch function to retrieve data in Matlab from an SQL query to an external database. This works fine with Matlab 2014b but doesn't execute anymore with Matlab 2016b. The command will cause Matlab to freeze.
The database connection is set up as following
dbConnection = database.ODBCConnection(dbInstance,dbUsername,dbPassword);
The query is then executed thanks to:
cursor = exec(dbConnection,sqlQuery);
Data is retrieved after with:
cursor = fetch(cursor);
The last command here causes Matlab to freeze whereas no issues happen with 2013a or 2014b.
0 个评论
回答(1 个)
Nirav Sharda
2016-12-12
The problem seems to be due to a bug in the native ODBC driver. As a workaround, you can use JDBC drivers. Addtionally, JDBC driver are recommended over ODBC drivers for 64 bit machines.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Database Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!