473,395 Members | 2,798 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,395 software developers and data experts.

Syntax error caused by Regional settings

(Type your message here)

--------------------------------
From: Darren Grafton

I'm trying to write a webservice consuming program in vb .net toconsume a webservice from Quebec, Canada. I'm getting thewierdest error; when I changed my regional settings through thecontrol panel I get a syntax error in my code!! My usualsetting is English United States and I changed it to FrenchCanada. I'm not gonna post the whole code but I'll put the linethat gives an error. Has anyone ever heard of or experiencedthis kinda thing befor. I'm not even kidding I switched backand forth serveral times and only get the error while in Frenchcanada, while the program works fine in English United States

Here's the line:

PatientRows = RawPatients.Select("PatientNum = "& tempRow("PatientNum"))

This is just too wierd for me

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>wFDY6qGcIki3V6A2jrTiLg==</Id>
Nov 20 '05 #1
2 1212
Hi Darren
I have seen such situation before and the reason was like this. Check if
you are using any decimal numbers separators within your code, this differ
in French from English, commas may be interpreted instead
hope this helps
Mohamed Mahfouz
MEA Developer Support Center
ITworx on behalf of Microsoft EMEA GTSC

Nov 20 '05 #2
"Darren Grafton via .NET 247" <an*******@dotnet247.com> wrote in message
news:e4**************@tk2msftngp13.phx.gbl...
.. . .
I'm getting the wierdest error; when I changed my regional settings
through the control panel I get a syntax error in my code!!


PatientRows = RawPatients.Select("PatientNum = " _
& tempRow("PatientNum") _
)

Do you have "Option Strict On"?? I'm guessing not.

If the "PatientNum" field in the tempRow row is a number and is
large enough to need thousand separators, the [Evil] Type Coercion
from [something like] Integer to String (to do the concatentation) might
be putting the separators in. Try this instead :

PatientRows = RawPatients.Select( "PatientNum = " _
& tempRow("PatientNum").ToString( "0" ) _
)

That should (I think) override any local numerical settings and force
the number to be formatted without /any/ dots, commas, blips, blobs
or whatever.

HTH,
Phill W.
Nov 20 '05 #3

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

Similar topics

1
by: nerman | last post by:
Hello I have a problem with the regional settings. I have set the regional settings of the web server to display the numbers in this format 123.456,78 But when I open my web site all number are...
4
by: Jonathan | last post by:
Dear All, I am trying to set a webserver to use French regional settings for testing ASP pages. According to http://support.microsoft.com/kb/q306044, for IIS5, this is a matter of changing...
2
by: Bob Dydd | last post by:
Hi Everbody Question Changing the regional settings ie. from UK to US AUS etc, Access retains the original currency format that the application was created in. So if an mdb that is written...
1
by: John | last post by:
Hi, The following behavior when using J# vs. C# is really bothering me. When I have the regional settings on my workstation set to a non-US settings (eg: Danish); it seems that J# disregards...
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"...
1
by: amitbadgi | last post by:
HI i am getting the foll error while conv an asp application to asp.net Exception Details: System.Runtime.InteropServices.COMException: Syntax error in UPDATE statement. Source Error: Line...
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...
1
by: John Shadel | last post by:
I have the following setup: 1. ASP.NET 2.0 web app hosted on a web server (inetpub directory hosting physical files of the web site on a different drive name, E: than the SQL Server Instance,...
0
by: aboutjav.com | last post by:
Hi, I need some help. I am getting this error after I complete the asp.net register control and click on the continue button. It crashed when it tries to get it calls this Profile property ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
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.