if (conn == null)
{
throw new IllegalArgumentException("SQLConnection == null");
}
SQLDatabaseMetaData md = conn.getSQLMetaData();
try
{
_targetDBMS = md.getDatabaseProductName();
}
catch (Throwable ignore)
{
_targetDBMS = UNSUPPORTED;
}
try
{
// Current version of the validator webservice cannot handle
// anything greater than 30.
_targetDBMSVersion = md.getDatabaseProductVersion();
if (_targetDBMSVersion.length() > 30)
{
_targetDBMSVersion = _targetDBMSVersion.substring(0, 30);
}
}
catch (Throwable ignore)
{
_targetDBMSVersion = UNSUPPORTED;
}
_connTechnology = "JDBC";
try
{
_connTechnologyVersion = String.valueOf(md.getJDBCVersion());
}
catch (Throwable ignore)
{
_connTechnologyVersion = UNSUPPORTED;
}