I need to pass catalog information into functions such as COLUMNS, TABLES, etc. I have created a metadata object and am trying to retrieve catalog information using the "Catalogs" property:
metadata = dmd(conn);props = get(metadata);catalogs = props.Catalogs;
where "conn" is the database connection object.
The "catalogs" variable contains more than one value; it contains the catalog that I have connected to (which was specified when I created the data source) as well as other catalogs that exist for the specific DBMS I am connecting to. COLUMNS, TABLES, and other functions that require metadata objects expect just one catalog name.
I am looking for a way to retrieve the catalog name for the specific catalog that I am connected to without having to parse through the array returned by reading the "Catalogs" property as described above.
Best Answer