- switch(dataType)
- {
- case DB_DATA_TYPE_VARCHAR :
- dataTypeName = typeInfVarchar.TypeName;
- break;
- case DB_DATA_TYPE_INTEGER :
- dataTypeName = typeInfInteger.TypeName;
- break;
- case DB_DATA_TYPE_FLOAT :
- dataTypeName = typeInfFloat.TypeName;
- break;
- case DB_DATA_TYPE_DATE :
- dataTypeName = typeInfDate.TypeName;
- break;
- case DB_DATA_TYPE_BLOB :
- dataTypeName = typeInfBlob.TypeName;
- break;
- default:
- return FALSE;
- }
-
- // Set the modify or alter syntax depending on the type of database connected to
- switch (Dbms())
- {
- case dbmsORACLE :
- alterSlashModify = "MODIFY";
- break;
- case dbmsMS_SQL_SERVER :
- alterSlashModify = "ALTER COLUMN";
- break;
- case dbmsUNIDENTIFIED :
- return FALSE;
- case dbmsSYBASE_ASA :
- case dbmsSYBASE_ASE :
- case dbmsMY_SQL :
- case dbmsPOSTGRES :
- case dbmsACCESS :
- case dbmsDBASE :
- default :
- alterSlashModify = "MODIFY";
- break;
- }
-
- // create the SQL statement
- sqlStmt.Printf(wxT("ALTER TABLE %s %s %s %s"), tableName.c_str(), alterSlashModify.c_str(),
- columnName.c_str(), dataTypeName.c_str());
+ switch(dataType)
+ {
+ case DB_DATA_TYPE_VARCHAR :
+ dataTypeName = typeInfVarchar.TypeName;
+ break;
+ case DB_DATA_TYPE_INTEGER :
+ dataTypeName = typeInfInteger.TypeName;
+ break;
+ case DB_DATA_TYPE_FLOAT :
+ dataTypeName = typeInfFloat.TypeName;
+ break;
+ case DB_DATA_TYPE_DATE :
+ dataTypeName = typeInfDate.TypeName;
+ break;
+ case DB_DATA_TYPE_BLOB :
+ dataTypeName = typeInfBlob.TypeName;
+ break;
+ default:
+ return false;
+ }
+
+ // Set the modify or alter syntax depending on the type of database connected to
+ switch (Dbms())
+ {
+ case dbmsORACLE :
+ alterSlashModify = "MODIFY";
+ break;
+ case dbmsMS_SQL_SERVER :
+ alterSlashModify = "ALTER COLUMN";
+ break;
+ case dbmsUNIDENTIFIED :
+ return false;
+ case dbmsSYBASE_ASA :
+ case dbmsSYBASE_ASE :
+ case dbmsMY_SQL :
+ case dbmsPOSTGRES :
+ case dbmsACCESS :
+ case dbmsDBASE :
+ default :
+ alterSlashModify = "MODIFY";
+ break;
+ }
+
+ // create the SQL statement
+ sqlStmt.Printf(wxT("ALTER TABLE %s %s %s %s"), tableName.c_str(), alterSlashModify.c_str(),
+ columnName.c_str(), dataTypeName.c_str());