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

1 view (last 30 days)
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?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
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.

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!