Why do I receive an error about a Java method called dmdColumns when using the COLUMNS function in the Database Toolbox 3.0 (R14)?

4 ビュー (過去 30 日間)
When executing the following statements to retrieve metadata about my database:
conn = database('sourcename', 'user', 'pass');
dbmeta = dmd(conn);
catalog = get(dbmeta 'Catalogs');
columninfo = columns(dbmeta, catalog, 'tablename');
the following error is displayed:
??? No method 'dmdColumns' with matching signature found for class 'com.mathworks.toolbox.database.databaseDMD'.
Error in ==> dmd.columns at 27
tmp = dmdColumns(a,d.DMDHandle,c,s);
How can I retrieve information about the column names in my database catalog?

採用された回答

MathWorks Support Team
MathWorks Support Team 2009 年 6 月 27 日
Database functions that use the "catalog" argument, like COLUMNS, accept only a single catalog. The error you received occurs when you provide multiple catalogs. Check the contents of "catalog" to ensure it only contains a single catalog name. If it contains more than one, index one of the names. For example,
catalogs = get(dbmeta, 'Catalogs');
catalog = catalogs{1};
columninfo = columns(dbmeta, catalog, 'tablename');
Note that this applies for all functions that operate on metadata objects and use the catalog argument, such as TABLES, PROCEDURES, and so on.

その他の回答 (0 件)

カテゴリ

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