11/16/2001: Java JDBC Metadata Holds Query Column Names
Java JDBC code to find column names in a query.
private Connection mAccess; private Statement mStatement; private ResultSet mResultSet; private ResultSetMetaData mResultSetMetaData; Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); mAccess = DriverManager.getConnection("jdbc:odbc:pma_boeing"); mStatement = mAccess.createStatement(); ResultSet mResultSet = mStatement.executeQuery("Select top 10 * from boeing"); mResultSetMetaData = mResultSet.getMetaData(); int TotalColumn = mResultSetMetaData.getColumnCount(); for (int j = 1; j <= TotalColumn; j++) { System.out.println("[" + j + "] " + mResultSetMetaData.getColumnName(j)); }
11/15/2001: More Time Studies Today Using Jdbc To
More time studies today using JDBC to move records from MS Access to Oracle.
With an Oracle Insert taking 25 msecs and the XML creation taking 1 msec, each object starts out taking 26 msecs. When the whole program (reading records, starting threads, database connections, etc.) was run, each object took 149 msecs to process. After I adding a database connection pool, each object took 109 msecs. Which is still too long. My goal is 36 msecs to process 100,000 objects per hour.