Welcome to DB2/AS400 hell, I'm in the same boat (sinking) as you. All joking aside, here is what I would do to help trouble shoot the issue. It may be a character code set translation issue (which your DB2 driver must use)
1. Login to the AS400 and do a DSPFFD (display phsyical file description) on the table in question, then copy and paste the results of that column information. The info I'm looking for is fieldname, data type, field length, and coded character set. 2. Copy and paste your connection string that you are using in here, this is important as it controls how character sets are decoded. 3. Go into iSeries navigator and go to Databases>>your database>>Schemas>>Library>>Tables, then find the table in question and right click on it and click on "Generate SQL". Then hit the "Generate" button. Copy the information from the creation script for the field in question to this forum post. 4. List the version of AS400 you are running (V5R4, V6R1, etc) and tell me the version of the IBM.DB2.Iseries .NET driver you are using 5. Also paste in your HBM XML mapping file so I can compare all the information. Once we have that we may be able to get to the bottom of whats going on. On Aug 18, 8:28 pm, rhartzog <[email protected]> wrote: > I am very new to trying to access data on a db2 sitting on an AS400 > server. There is a column which shows in EZVIEW as data type "A" with > a length of 12. Using iNavigator and looking at the table definition > it shows as character 12. When I map this to a string property it > writes out as System.Byte[] so I am a bit confused. There is very > little in the way of documentation or examples for using NH with db2 > so I am coming up short on finding any help with this. Any help with > how to map these data types or mapping to a db2 in general would be > greatly appreciated. -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
