- /* MySQL goes out on this one. We also declare the relevant key NON NULL above */
+ // MySQL goes out on this one. We also declare the relevant key NON NULL above
sqlStmt += wxT(",PRIMARY KEY (");
break;
}
default:
{
sqlStmt += wxT(",CONSTRAINT ");
sqlStmt += wxT(",PRIMARY KEY (");
break;
}
default:
{
sqlStmt += wxT(",CONSTRAINT ");
- sqlStmt += tableName;
+ // DB2 is limited to 18 characters for index names
+ if (pDb->Dbms() == dbmsDB2)
+ {
+ wxASSERT_MSG((tableName && wxStrlen(tableName) <= 13), wxT("DB2 table/index names must be no longer than 13 characters in length.\n\nTruncating table name to 13 characters."));