IxiRancid Posted July 29, 2005 Posted July 29, 2005 Hi, I'm from a CE country that has some special characters in the alphabet. DB2 stores values in it's own code table, then when "pumped out" they have to be changed to "870" code table (in AS400 prompt window). I did a casual pull and filled a dataset in VB.NET but the characters (our native: Slovenia, Croatia, Serbia...) are looking really funny and strange. Anyone (possibly from CE europe) has similar problems or solutions? I tried changing DataSet locales, but now the thing just doesn't work at all :rolleyes: Quote
IxiRancid Posted September 15, 2005 Author Posted September 15, 2005 I like to clean up my posts if I find a solution. Well, here I did a workaround. Perhaps someone from Slovenia or other CE countries might find this useful Here it goes: pre: reference IBM Client Access Express (cwbx.dll) 1. use INSERT SELECT to get the rows you want and put them into an AS400 File 2. use VB.NET to run CHGPF (change physical file CCSID to 870) - see code below 3. pump the data out again Dim systemNames As New cwbx.SystemNames Dim as400 As New cwbx.AS400System Dim cmdAS400 As New cwbx.Command Dim pgm As New cwbx.Program Dim dQueue As New cwbx.DataQueue Dim strCvtr As New cwbx.StringConverter Dim lngCvtr As New cwbx.PackedConverter With as400 .Define(systemNames.DefaultSystem) .UserID = "UserName" .Password = "Password" End With With cmdAS400 .system = as400 .Run("CHGPF FILE(NMYLIB/BMNS_01) CCSID(870)") End With This is the main part you need to use. The rest is just DataReader & OleDbCommand sutff. :rolleyes: Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.