Thank you MattO, here is the information you have requested:

Key column:
Column: ABAN8
Data Type: Zoned
Field Length: 8 0 (yes a space is between those two numbers)
Code Character Set: null

No problems displaying information:
Column: ABALPH
Data Type: CHAR
Field Length: 40
Code Character Set: 37

Problems displaying information:
Column: ABALKY
Data Type: CHAR
Field Length: 20
Code Character Set: 65535

2) I took a screenshot of my hibernate.cfg file:
http://lh5.ggpht.com/_HHLbJSECQBs/TG1nAn5p8FI/AAAAAAAAATY/dqugRhiflhA/sessionFactory.gif

3) --  Generate SQL
--  Version:                    V5R4M0 060210
--  Generated on:               08/19/10 12:04:01
--  Relational Database:        DWHOMES
--  Standards Option:           DB2 UDB iSeries
CREATE TABLE TESTDATA.F0101 (
--  SQL150B   10   REUSEDLT(*NO) in table F0101 in TESTDATA ignored.
        ABAN8 NUMERIC(8, 0) NOT NULL DEFAULT 0 ,
--  SQL150D   10   EDTCDE in column ABAN8 ignored.
        ABALKY CHAR(20) CCSID 65535 NOT NULL DEFAULT '' ,
        ABALPH CHAR(40) CCSID 37 NOT NULL DEFAULT '' , ...

4) Looks like V5R4 from item #3 above. I am using version 12.0.0.0 of
the IBM.Data.DB2.iSeries.dll

5) A screenshot of the mapping file.  I have tried various definitions
with the problematic column. 
http://lh5.ggpht.com/_HHLbJSECQBs/TG1r1AGDT2I/AAAAAAAAATk/ceHT9vWi3_I/mapping.gif


I am not even sure my session factory is set up properly, so if
something looks wrong it probably is.

Thanks again,
Ryan

On Aug 19, 8:00 am, MattO <[email protected]> wrote:
> 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.

Reply via email to