Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Change datatype in XML

From: "Joe Fawcett" <joefawcett@---------.------>
To: NULL
Date: 6/3/2008 8:11:00 AM

"VBcode" <VBcode@d...> wrote in message 
news:229AB529-D1AD-49D8-B814-9BACA5377794@m......
> We have an ASP file written in VB script, which connects to Oracle via
> Microsoft OLEDB Provider for Oracle (Provider=MSDAORA.1).
>
> Set objCmd = Server.CreateObject("ADODB.Command")
> Set objRs = Server.CreateObject("ADODB.RecordSet")
>
> 'Code here to asign connection string, parameters for Oracle stored
> procedure to objCmd
>
> Set objRs = objCmd.Execute
> Response.ContentType = "text/xml"
> objRs.Save Response ,adPersistXML
>
> The XML file has one of the data members like this (Oracle 10g):
>
> <s:AttributeType name="G21" rs:number="21" rs:nullable="true"
> rs:writeunknown="true">
>  <s:datatype dt:type="float" dt:maxLength="8" rs:precision="15"
> rs:fixedlength="true" />
>  </s:AttributeType>
>
> However, it retruned as below when Oracle was 9i:
>
> <s:AttributeType name="G21" rs:number="21" rs:nullable="true"
> rs:writeunknown="true">
>  <s:datatype dt:type="number" rs:dbtype="varnumeric" dt:maxLength="20"
> rs:scale="0" rs:precision="38" />
>  </s:AttributeType>
>
> There is no datatype and stored procedure change on Oracle side.  Why do 
> we
> get diffrent datatype in ASP?  Is there any impact on data?  Is it 
> possible
> to change the data attribute back to NUMBER in the ASP after the call to
> Oracle stored procedure?  If it is, how?

I don't see that this is any of ASP's doing, looks like underlying table has 
changed (although you say it hasn't).
If you have to have the same return type then it appears you have two 
options:
1) Wrap the Oracle procedure in one that runs the new one but casts the 
particular field to the older type
2) Transform the XML, via XSLT perhaps



-- 

Joe Fawcett (MVP - XML)

http://joe.fawcett.name




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