Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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:

  • 1 month later...
Posted

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:

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...