Difficulty using the database function

Hi. I have Matlab 2021b and Matlab 2024a installed and with Matlab 2021b I can easily connect to a database via an ODBC bridge just like in the documentation example :
conn=database('odbcdatasource','scott','tiger')
The same line of code doesnt work with Matlab 2024a. I get the error
Dot indexing into the result of a function call requires parentheses after the function name. The supported syntax is 'database().internal'.
Error in database (line 59)
connection = database.internal.utilities.hdatabase(varargin{:});
I dont get it. What am I doing wrong ?

 採用された回答

Naren
Naren 2024 年 5 月 8 日

0 投票

1 件のコメント

Blue
Blue 2024 年 5 月 8 日
Indeed, I changed the pathdef and now it works. Thank you for your answer. I still dont understand how the pathdef might cause the error above however

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeStartup and Shutdown についてさらに検索

製品

リリース

R2024a

タグ

質問済み:

2024 年 5 月 7 日

コメント済み:

2024 年 5 月 8 日

Community Treasure Hunt

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

Start Hunting!

Translated by