Expand|Select|Wrap|Line Numbers
- ResultSet schema_rs = db_metadata.getSchemas();
- while(schema_rs.next()){
- String schema_name = schema_rs.getString("TABLE_SCHEM");
- System.out.println("Schema Name: " + schema_name);
- }
- System.out.println("Yahoo: " + schema_rs.getStatement());
- schema_rs.getStatement().close();
Here it matches the condition.
Here no Schemas found ...and here I am using MySQL.
If i tried with some other database so far I tried with PostgreSQL and Sybase.
There I found some Schemas and there the ResultSet.getStatement does not return null as it generated through DatabaseMetadata.
Is it database dependent?Or if no schemas found then it happens.
Or it is a specific problem with MySQL?
Debasis Jana.