String[] rowData = new String[listModel.getSize()];
for (int i = 0; i < rowData.length; i++)
rowData[i] = "";
for (int i = 0; i < rowData.length; i++)
{
FieldDetails fd = (FieldDetails) listModel.elementAt(i);
rowData[i] += fd.getFieldName();
rowData[i] += " ";
rowData[i] += fd.getFieldType();
rowData[i] += "(";
rowData[i] += fd.getFieldLength();
rowData[i] += ")";
if (fd.IsUnisigned()) rowData[i] += " UNSIGNED ";
if (fd.IsBinary()) rowData[i] += " BINARY ";
if (fd.IsZeroFill()) rowData[i] += " ZEROFILL ";
if (fd.getDefault().length() > 0) rowData[i] += " DEFAULT '" + fd.getDefault() + "'";
if (fd.IsNotNull()) rowData[i] += " NOT NULL ";
if (fd.IsAutoIncrement()) rowData[i] += "AUTO_INCREMENT ";
if (fd.IsPrimary()) rowData[i] += ", PRIMARY KEY(" + fd.getFieldName() + ")";
if (fd.IsUnique()) rowData[i] += ", UNIQUE(" + fd.getFieldName() + ")";
if (fd.IsIndex()) rowData[i] += ", INDEX(" + fd.getFieldName() + ")";
}
for (int i = 0; i < rowData.length; i++)
{
SQLCommand += rowData[i];