Results 1 to 1 of 1
Thread: Problems with getTables marked
- 08-06-2009, 07:20 PM #1
Member
- Join Date
- Aug 2009
- Posts
- 1
- Rep Power
- 0
Problems with getTables marked
Hi.
I need to obtain a table description in java with MySql database.
The javaapi says:
The REMARKS is my target, but if i try:Java 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.
I obtain a blank line.Java 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(""));
Why?
Thanks
Similar Threads
-
having problems
By pinkdiamondgail in forum New To JavaReplies: 6Last Post: 02-06-2009, 11:35 PM -
many to many problems
By cecily in forum JDBCReplies: 1Last Post: 08-02-2007, 05:51 PM -
a few problems
By gary in forum AWT / SwingReplies: 0Last Post: 07-11-2007, 04:57 PM -
problems with JPA
By Ed in forum New To JavaReplies: 2Last Post: 07-04-2007, 05:34 AM -
Problems with the jar
By Freddie in forum NetBeansReplies: 2Last Post: 05-29-2007, 03:50 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks