Fetch command no longer works with Matlab 2016b

3 ビュー (過去 30 日間)
Jean Dupin
Jean Dupin 2016 年 11 月 29 日
コメント済み: Jean Dupin 2016 年 12 月 13 日
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.

回答 (1 件)

Nirav Sharda
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.
  1 件のコメント
Jean Dupin
Jean Dupin 2016 年 12 月 13 日
Sorry, just to be clear, you are saying that the ODBC driver set up on my computer has a bug?
Thanks for your answer.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeDatabase Toolbox についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by