Problems with getTables marked
Hi.
I need to obtain a table description in java with MySql database.
The javaapi says:
Code:
method:
public ResultSet getTables(String catalog,
String schemaPattern,
String tableNamePattern,
String[] types)
throws SQLException
Retrieves a description of the tables available in the given catalog. Only table descriptions matching the catalog, schema, table name and type criteria are returned. They are ordered by TABLE_TYPE, TABLE_SCHEM and TABLE_NAME.
Each table description has the following columns:
1. TABLE_CAT String => table catalog (may be null)
2. TABLE_SCHEM String => table schema (may be null)
3. TABLE_NAME String => table name
4. TABLE_TYPE String => table type. Typical types are "TABLE", "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY", "LOCAL TEMPORARY", "ALIAS", "SYNONYM".
5. REMARKS String => explanatory comment on the table
6. TYPE_CAT String => the types catalog (may be null)
7. TYPE_SCHEM String => the types schema (may be null)
8. TYPE_NAME String => type name (may be null)
9. SELF_REFERENCING_COL_NAME String => name of the designated "identifier" column of a typed table (may be null)
10. REF_GENERATION String => specifies how values in SELF_REFERENCING_COL_NAME are created. Values are "SYSTEM", "USER", "DERIVED". (may be null)
Note: Some databases may not return information for all tables.
The REMARKS is my target, but if i try:
Code:
Connection con = DriverManager.getConnection("jdbc:mysql://"+args[0],args[1],args[2]);
ResultSet rs = con.getMetaData().getTables(null, null, "AZIONE", null);
while(rs.next()){
System.out.println(rs.getString(""));
I obtain a blank line.
Why?
Thanks