Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: ADO Recordset via HTTP >Thread Next - Re: ADO Recordset via HTTP Re: ADO Recordset via HTTPTo: NULL Date: 12/3/2005 12:03:00 PM I show the scenario with code example.
Client side.
' initialize objects variables
dim rs AS New ADODB.Recordset
dim xml AS New MSXML2.XMLHTTP
dim doc AS New MSXML2.DOMDocument
' build recordset
rs.Open sWhere, cn, adOpenDynamic, adLockOptimistic
' send recordset data via HTTP to an ASP page (see Server side) setted
in sUrlTx string
xml.Open "POST", sUrlTx, False
rs.Save doc, adPersistXML
xml.send doc
sRet = xml.responseText
Server side (ASP page)
' initialize objects variables
dim rs, doc,
set rs = server.CreateObject("ADODB.Recordset")
set doc = server.CreateObject("MSXML2.DOMDocument")
' Load Request into DomDocument
doc.load Request
' rebuild recordset from data received
rs.CursorLocation = 3 'adUseClient
rs.Open doc
So, the recordset rebuild on server side has real value without decimal
separator (ex. "12.75" value client side, is "1275" value server side).
To see better this transormation, I've saved recordset (Server side) on a
file in XML format (with code: rs.Save(pathFileRs, 1)) and the result is
what I posted in my previous email.
As I said in previous email, this wrong transormation occours ONLY ON A
SPECIFIC SERVER.
Infact I've tried on other PC (server) with same software platform with
RIGHT trasformation ("12.75" also on server side).
In this scenario, I suppose, regional settings don't affect in rebuilding
recordset.
Thanks for any suggestion
Adriano
"Martin Honnen" <mahotrash@y...> ha scritto nel messaggio
news:%23zpJRv29FHA.1484@t......
>
>
> Adry wrote:
>
>
>> Infact, sending a recordset with real values, rebuilding the recordset in
>> the server receiver these values lose the decimal separator (point).
>>
>> The very problem is that this occours only on a specific server (Win 2K
>> Server - SP4 - XML 3.0 SP5 - SQL 2K Standard).
>> Using other servers, infact, this problem doesn't occour.
>
>> <xml xmlns:s='uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882'
>> xmlns:dt='uuid:C2F41010-65B3-11d1-A29F-00AA00C14882'
>> xmlns:rs='urn:schemas-microsoft-com:rowset'
>> xmlns:z='#RowsetSchema'>
>> <s:Schema id='RowsetSchema'>
>> <s:ElementType name='row' content='eltOnly' rs:updatable='true'>
>> <s:AttributeType name='QuantitaOreScaricata' rs:number='6'
>> rs:nullable='true' rs:writeunknown='true' rs:basecatalog='PortaleSapes'
>> rs:basetable='OrdiniAssistenzaCodComm'
>> rs:basecolumn='QuantitaOreScaricata'>
>> <s:datatype dt:type='r4' dt:maxLength='4' rs:precision='7'
>> rs:fixedlength='true'/>
>> </s:AttributeType>
>> </s:ElementType>
>> </s:Schema>
>> <rs:data>
>> <z:row QuantitaOreScaricata='12.75'/>
>
>> <z:row QuantitaOreScaricata='1275'/>
>
> Is that processed on some system with locale settings where the decimal
> separator is not '.' but ',' or something else and where '.' might do
> something else (e.g. separate groups). That could explain that parsing
> 12.75 throws out the '.' as it seems misplaced.
> I don't know how you process the data but you might want to check what
> regional settings respectively locale is used to parse and format numbers.
>
> --
>
> Martin Honnen --- MVP XML
> http://JavaScript.FAQTs.com/
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
