public void testTableMetaData() throws Exception {
  Statement stmt=con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
  ResultSet rs=stmt.executeQuery("SELECT * FROM master.dbo.sysdatabases");
  assertNotNull(rs);
  ResultSetMetaData rsmd=rs.getMetaData();
  Assert.assertEquals("master",rsmd.getCatalogName(1));
  Assert.assertEquals("dbo",rsmd.getSchemaName(1));
  Assert.assertEquals("sysdatabases",rsmd.getTableName(1));
  stmt.close();
  rs.close();
}

public void testTableMetaData ( ) throws Exception { Statement stmt = con . createStatement ( ResultSet . TYPE_SCROLL_INSENSITIVE , ResultSet . CONCUR_READ_ONLY ) ; ResultSet rs = stmt . executeQuery ( "SELECT * FROM master.dbo.sysdatabases" ) ; assertNotNull ( rs ) ; ResultSetMetaData rsmd = rs . getMetaData ( ) ; Assert . assertEquals ( "master" , rsmd . getCatalogName ( 1 ) ) ; Assert . assertEquals ( "dbo" , rsmd . getSchemaName ( 1 ) ) ; Assert . assertEquals ( "sysdatabases" , rsmd . getTableName ( 1 ) ) ; stmt . close ( ) ; rs . close ( ) ; }
test for bug [ 1023984 ] protocol error processing table meta data . < p > test to demonstrate failure to process the tds table name token correctly . must be run with tds = 8 . 0 .
