I created a StrataFrame business object using a table in a DB2 database hosted on an IBM mainframe. The StrataFrame code generator created the code immediately below which will not compile and is not correct. IBM.Data.DB2.DB2Type is a type (enum) and not a value.
_FieldNativeDbTypes = new Dictionary<string, int>(10);
_FieldNativeDbTypes.Add("NUM_STR_ID", IBM.Data.DB2.DB2Type);
_FieldNativeDbTypes.Add("NUM_STR", IBM.Data.DB2.DB2Type);
_FieldNativeDbTypes.Add("NM_STR", IBM.Data.DB2.DB2Type);
_FieldNativeDbTypes.Add("NUM_CLU", IBM.Data.DB2.DB2Type);
_FieldNativeDbTypes.Add("DES_STR", IBM.Data.DB2.DB2Type);
_FieldNativeDbTypes.Add("NUM_ZN", IBM.Data.DB2.DB2Type);
_FieldNativeDbTypes.Add("NUM_WH", IBM.Data.DB2.DB2Type);
_FieldNativeDbTypes.Add("NUM_PPO", IBM.Data.DB2.DB2Type);
_FieldNativeDbTypes.Add("NUM_ASN", IBM.Data.DB2.DB2Type);
_FieldNativeDbTypes.Add("IND_STR_STS", IBM.Data.DB2.DB2Type);
I made modifications to the code as shown below which allows the code to compile and I believe that I have made the correct selections for the data type enum.
_FieldNativeDbTypes = new Dictionary<string, int>(10);
_FieldNativeDbTypes.Add("NUM_STR_ID", (int)IBM.Data.DB2.DB2Type.Integer);
_FieldNativeDbTypes.Add("NUM_STR", (int)IBM.Data.DB2.DB2Type.Integer);
_FieldNativeDbTypes.Add("NM_STR", (int)IBM.Data.DB2.DB2Type.VarChar);
_FieldNativeDbTypes.Add("NUM_CLU", (int)IBM.Data.DB2.DB2Type.Integer);
_FieldNativeDbTypes.Add("DES_STR", (int)IBM.Data.DB2.DB2Type.VarChar);
_FieldNativeDbTypes.Add("NUM_ZN", (int)IBM.Data.DB2.DB2Type.Integer);
_FieldNativeDbTypes.Add("NUM_WH", (int)IBM.Data.DB2.DB2Type.Integer);
_FieldNativeDbTypes.Add("NUM_PPO", (int)IBM.Data.DB2.DB2Type.Integer);
_FieldNativeDbTypes.Add("NUM_ASN", (int)IBM.Data.DB2.DB2Type.Integer);
_FieldNativeDbTypes.Add("IND_STR_STS", (int)IBM.Data.DB2.DB2Type.Integer);