Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: ADO Recordset via HTTP

From: Martin Honnen <mahotrash@-----.-->
To: NULL
Date: 12/3/2005 5:30:00 PM

Adry wrote:


> In this scenario, I suppose, regional settings don't affect in rebuilding 
> recordset.

I am not sure where the problem is introduced but the following VBScript 
program shows that VBScript parses strings as numbers depending on 
locale settings:

Option Explicit
Sub CheckParsing (InputString, LocaleToUse)
   Dim OldLocale
   OldLocale = SetLocale(LocaleToUse)
   Dim N
   N = CDbl(InputString)
   WScript.Echo "Locale is: " & LocaleToUse _
     & "; parsed '" & InputString & "' as number " & _
     N
   SetLocale OldLocale
End Sub

Dim InputString
InputString = "12.75"

CheckParsing InputString, GetLocale
CheckParsing InputString, "it-IT"
CheckParsing InputString, "de-DE"
CheckParsing InputString, "en-US"


Outputs the following here on Windows XP German:

Locale is: 1031; parsed '12.75' as number 1275
Locale is: it-IT; parsed '12.75' as number 1275
Locale is: de-DE; parsed '12.75' as number 1275
Locale is: en-US; parsed '12.75' as number 12.75


I don't think MSXML DOMDocument will do any such stuff, I am not sure 
whether the ADODB components when building record sets somehow depend on 
locale settings.

I have no other idea, somehow 12.75 showing up as 1275 for me too much 
looks like parsing assuming the wrong locale and not interpreting the 
'.' symbol as the decimal separator.

-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent