protected boolean usesDOTable ( ) throws Exception { Connection conn = getConnection ( ) ; DatabaseMetaData dmd = conn . getMetaData ( ) ; // check if we need to update old table ResultSet rs = dmd . getTables ( null , null , "do%" , null ) ; while ( rs . next ( ) ) { if ( rs . getString ( "TABLE_NAME" ) . equals ( "do" ) ) { rs . close ( ) ; return true ; } } rs . close ( ) ; return false ; }
Determines whether or not the database has a table named do .