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 CenterFile Exchange에서 Database Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by