Code example for Connection

Methods: getMetaData

0
			logger.debug("Checking meta-data for retrieving max length of table names"); 
		DatabaseMetaData dmd = null;
		 
		try { 
			Connection connection = dataSource.getConnection();
			dmd = connection.getMetaData();			
			 
			maxTableNameLength = dmd.getMaxTableNameLength();
			if (logger.isDebugEnabled()) 
				logger.debug("Support max table name length = " + maxTableNameLength);
 
			maxColumnNameLength = dmd.getMaxColumnNameLength();
			if (logger.isDebugEnabled()) 
				logger.debug("Support max column name length = " + maxColumnNameLength);
			 
			connection.close();
			 
		} catch (SQLException e) {
			if (logger.isDebugEnabled()) 
				logger.debug(e);
Contextual code suggestions in your IDE  Get Codota for Java