Why do I receive an error about a Java method called dmdColumns when using the COLUMNS function in the Database Toolbox 3.0 (R14)?
16 次查看(过去 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
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Database Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!