473,397 Members | 2,056 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

AS400 + VB.NET and Regional Setting

Hi,

We have and IBM AS400 and I belive the reional setting is Turkish. The IBM
Client-Access for Windows that install in our PC (WIN XP SP2) set to Turkish
characters.

Now my PC has English (US) regional setting and I am not having any problem
to connect.

But If I change my PC Regional setting to Turkish all of my VB.NET code is
not working. Data that comes from AS400 either not recognizable or very
unusal.

Example the decimal variable in PC Regional Setting (English-US) would be
15,97.50
But if my PC Regional Setting set to Turkish than value become as: 15.975.050

Does anyone knows what is happening or how can I set the right coding in
VB.NET even if my PC has Turkish Reginal Setting?

I thank you for your kind understanding to reading my post.

Rgds,
GC
Oct 25 '05 #1
6 2701
Niyazi,

I don't know if I have an answer however an important part of your question
is at least for my confusing.
Example the decimal variable in PC Regional Setting (English-US) would be
15,97.50
But if my PC Regional Setting set to Turkish than value become as:
15.975.050


15,97.50 is not an representation of a value using the English language
style. Therefore cah you evaluate what is wrong in probably both
representations that you give.

Cor
Oct 25 '05 #2
Hi Cor,

The Regional Setting odf the English US number value is:
123,456,789.00

And if the Regional Setting is the Turkish than the number value is:
123.456.789,00

------------------------------------------------------------------------------------------

If my Regional Setting is English Us than my data value that comes from IBM
AS400 is: 369.103

And if my Regional Setting Turkish than my data value that comes from IBM
AS400 is: 36.910.331

The right value is 369.103 (3 Hundred Sixty nine thousand ...)

But in Turkisg Regional setting this comes as 36.910.331 (Thirty six million
.....)

I have no idea why the value will be representing itself such a way that has
a huge differences.

Cor, I thank you in advance to helping me out.

Rgds,
GC

Oct 26 '05 #3
Niyazi,

I assume that the AS400 is using EBCDIC and that it is translated using a
translation filter to ASCCI. I as well assume that what is given is in a
string format.
The right value is 369.103 (3 Hundred Sixty nine thousand ...)


This is not the right value in the English format, in the english format
what is 369,103 in our format.

Therefore I assume that is given to your process something as "369103,31"
the way that you translate this makes in my opinion why you get those
strange values. Can you show that to us?

Cor
Oct 26 '05 #4
Hi Cor,

You are right about it In the data row my value looks as you wrote above
("369103,31" ) And when my application try to send the data in to the EXCEL
sheet
than value is shown as wrote before.

The data that comes from the AS400 (and If my PC Regional setting is
Turkish) as you show it: ("369103,31" )

I have no idea that AS400 is using EBCDIC. How can I over come this problem?

I thank you in advance to helping me out.

Rgds,
GC

Oct 26 '05 #5
Niyazi,

I think that in your case it is the most simple to replace the comma by a
dot.

str = str.replace(",",".")
And than use the
dim myDouble as double = Double.Parse (str, CultureInfo.InvariantCulture)
I hope this helps,

Cor
Oct 26 '05 #6
Hi Cor,

Thank you for info. I did use the String replace method. But I am having one
of the table that reside in AS400 (the Currency Table).

I wrote my previous post but the real error was the when the time I was
trying to filling the dataset and if my PC Regional setting was Turkish than
I am getting error. Error was:

"The data value could not be converted for reasons other than sign mismatch
or data overflow. For example, the data was corrupted in the data store but
the row was still retrievable."

First was I created Windows services and the data will be transfered from
AS400 to SQL Server every 10 minute. Than later my boss set that I should put
extra menu button so user also can transfer the data manulay.

In the same code will work on Windows Services and didn't worked manually.

Than later I find the data was un regognizable due to Regional Setting.
Now I fixed the one the application using String Replace method, but I am
still having problem one application typicaly filling the dataset. Most of
the my application that have acces to AS400 works but the on the one table I
am having real problem and strangely my program works with Windows services
and doesn't work manualy!!!

Any suggestion or idea what might happened. I am more than happy to provide
the code as well.

Cor, I thank you for your kind help.

Rgds,
GC
Oct 27 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Grumfish | last post by:
Is there a way to tell Java what localization to use so applications and the compiler doesn't default to the system's setting? I'm using a computer with Windows 2000 with a regional setting of...
1
by: baijubr | last post by:
Hi, I am using com.ibm.as400.access.as400JdbcDataSource(Jt400.jar) to read data from DB2 on AS400 V5R3. But here binary is not getting translated. when tried on V5R1 it works. ie binary is...
0
by: CompDude | last post by:
Hi All I am trying to copy data from DB2 to SQL server using SQL Data Tranformation Services. I am able to do that by supplying AS400 username/password along with the iSeries DSN Name, at the...
12
by: magister | last post by:
Hello, I know I can set the Culture to what I want, but shouldn't the current culture be taken from the regional settings on the web server's control panel!!! Mine is set to "united kingdom"...
13
by: Sehboo | last post by:
Hello, we have data sitting on AS400 (V4R5M0) - DB2-400. I need to access that from my vb.net application. I don't know anything about AS400. Is it possible to get data from tables and stored...
6
by: Niyazi | last post by:
Hi, We have and IBM AS400 and I belive the reional setting is Turkish. The IBM Client-Access for Windows that install in our PC (WIN XP SP2) set to Turkish characters. Now my PC has English...
16
by: Colmag | last post by:
I've written an application with vb.net 2003 (framework 1.1) which automates a 3rd party viewing/printing application (via an activex control). I've released several versions over the last year...
4
by: Harold Crump | last post by:
Greetings, This is not strictly a ASP.NET question, but I am hoping someone can help. I have an ASP.NET web app that used the DateTime.Parse and Compare methods a lot. As expected, the...
5
by: hemantpatil | last post by:
i am writing following code to insert value in table test which has two fields id , current_ date but if i change regional seting English(United Staes ) to french(France) then it hows...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.