{
if (prov == null)
{
return;
}
ISession sourceSession = prov.getCopySourceSession();
ISession destSession = prov.getCopyDestSession();
if (sourceSession == null || destSession == null)
{
return;
}
ISQLConnection sourceCon = sourceSession.getSQLConnection();
ISQLConnection con = destSession.getSQLConnection();
TableColumnInfo[] colInfoArr = null;
try
{
colInfoArr = sourceCon.getSQLMetaData().getColumnInfo(ti);
} catch (SQLException e)
{
// ignore any SQLExceptions. This would only if we could not get
// column info from the SQL database meta data.
return;
}
for (int colIdx = 0; colIdx < colInfoArr.length; colIdx++)
{
TableColumnInfo colInfo = colInfoArr[colIdx];
IDatabaseObjectInfo selectedDestObj = prov.getDestSelectedDatabaseObject();
String schema = selectedDestObj.getSimpleName();
String catalog = selectedDestObj.getCatalogName();
String tableName = getQualifiedObjectName(
destSession, catalog, schema, TEST_TABLE_NAME, DialectFactory.DEST_TYPE);
StringBuilder sql = new StringBuilder("CREATE TABLE ");
sql.append(tableName);
sql.append(" ( ");
sql.append(colInfo.getColumnName());
sql.append(" CHAR(10) )");
boolean cascade = DialectFactory.isFrontBase(destSession.getMetaData());
try
{
dropTable(TEST_TABLE_NAME, schema, catalog, destSession, cascade, DialectFactory.DEST_TYPE);
DBUtil.executeUpdate(con, sql.toString(), false);
} catch (SQLException e)