Invalid Business Object Code Generated - DB2 Database


Author
Message
StrataFrame Team
S
StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Here's the link to save you some searching:

http://forum.strataframe.net/FindPost12266.aspx

StrataFrame Team
S
StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
I believe there was an issue with the _NativeDbType variable being used within our code, rather than the NativeDbType property (one returns a System.Type, while the other stores the enum), however, the issue should be resolved in the latest version of the DLLs.  Try getting the latest version from the Posted Releases forum and let me know if it fixes the problem (you should only need the AddIns DLL).

If it doesn't fix it, then let me know and I'll post it again.

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