InformixJDBC BUG?? Please HELP!
Posted in 1999
Topics: Connectivity: ODBC / JDBC / .NET, Java & JDBC Development
Hi all I have wrote a java programm with InformixJDBC driver (2.0). What I want is, use jdbc query the primary key of a table on a informix server (Version9), something like this: ... DatabaseMetaData md = conn.getMetaData(); ResultSet r = md.getSchemas(); r.next(); String schema = r.getString(1); System.out.println("schema is " + schema); r = md.getCatalogs(); for (int i=0; i<20; i++) r.next(); String catalog = r.getString(1); System.out.println("catalog is " + catalog); String table = "my_table"; ResultSet mdrs = md.getPrimaryKeys(catalog, schema, table); ==================================================== System.out.println("Finished getPrimaryKeys()."); System.out.println("mdrs.next() return " +mdrs.next()); I got correct schema and catalog retured, but the problem is mdrs.next() return false to me. That means the function getPrimaryKeys doesn't find any primary key in the table. But I'm 100% sure that "my_table" has a primary key. Is that a Bug of the JDBC driver? thanks in advance for every tips. --Zheng