Invalid Business Object Code Generated - DB2 Database


Author
Message
Alan W
Alan W
StrataFrame Beginner (21 reputation)StrataFrame Beginner (21 reputation)StrataFrame Beginner (21 reputation)StrataFrame Beginner (21 reputation)StrataFrame Beginner (21 reputation)StrataFrame Beginner (21 reputation)StrataFrame Beginner (21 reputation)StrataFrame Beginner (21 reputation)StrataFrame Beginner (21 reputation)
Group: Forum Members
Posts: 21, Visits: 39

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);

 

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search