Solved

cannot load field from xml source

Posted on 2012-04-13
1
300 Views
Last Modified: 2012-04-17
Hi I'm loading data from an xml source and it does not load the field lowvolume, it defualts it to a null.  It should load a 1 into the bit field I have in the sql server 2005 tbl, but loads null.  the  <CPOAdjustment>1</CPOAdjustment> field below <LowVolume>1</LowVolume> works correctly.  I'm using the ole db destionation task to load into the db.
 
here is my xml, the xsd is also below.  

<Vehicle>
  <VehicleId>260872</VehicleId>
  <TrimId>275498</TrimId>
  <ManufacturerAssignedModelCode />
  <SubTrim />
  <DisplayName>4.2 Quattro Coupe 2D</DisplayName>
  <VehicleTypeId>1</VehicleTypeId>
  <VehicleTypeDisplayName>UsedCar</VehicleTypeDisplayName>
  <SortOrder>1</SortOrder>
  <DisplayNameAdditionalData />
  <KBBSortOrder>0</KBBSortOrder>
  <AvailabilityStatus />
  <AvailabilityStatusEndDate>1800-01-01 00:00:00</AvailabilityStatusEndDate>
  <MarketName />
  <RelatedVehicleId>0</RelatedVehicleId>
  <AvailabilityStatusStartDate>1800-01-01 00:00:00</AvailabilityStatusStartDate>
  <LowVolume>1</LowVolume>
  <CPOAdjustment>1</CPOAdjustment>
  <MileageGroupId>12</MileageGroupId>
  <BlueBookName>4.2 Coupe 2D</BlueBookName>
  <ShortName>4.2 Quattro Coupe 2D</ShortName>
 </Vehicle>
 

<?xml version="1.0" encoding="utf-8"?>
 <xs:schema id="Vehicle" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="Vehicle">
   <xs:complexType>
    <xs:sequence>
     <xs:element name="VehicleId" type="xs:int" nillable="false" />
     <xs:element name="TrimId" type="xs:int" nillable="false" />
     <xs:element name="ManufacturerAssignedModelCode" type="ManufacturerModelCodeType" nillable="false" />
     <xs:element name="SubTrim" type="xs:string" nillable="false" />
     <xs:element name="DisplayName" type="xs:string" nillable="false" />
     <xs:element name="VehicleTypeId" type="xs:int" nillable="false" />
     <xs:element name="VehicleTypeDisplayName" type="xs:string" nillable="false" />
     <xs:element name="SortOrder" type="xs:int" nillable="false" />
     <xs:element name="DisplayNameAdditionalData" type="xs:string" nillable="false" />
     <xs:element name="KBBSortOrder" type="xs:int" nillable="false" />
     <xs:element name="AvailabilityStatus" type="xs:string" nillable="false" />
     <xs:element name="AvailabilityStatusEndDate" type="xs:string" nillable="false" />
     <xs:element name="MarketName" type="xs:string" nillable="false" />
     <xs:element name="RelatedVehicleId" type="xs:int" nillable="false" />
     <xs:element name="AvailabilityStatusStartDate" type="xs:string" nillable="false" />
     <xs:element name="LowVolumne" type="xs:boolean" nillable="false" />
     <xs:element name="CPOAdjustment" type="xs:boolean" nillable="false" />
     <xs:element name="MileageGroupId" type="xs:int" nillable="false" />    
     <xs:element name="BlueBookName" type="xs:string" nillable="false" />
     <xs:element name="ShortName" type="xs:string" nillable="false" />    
    </xs:sequence>
   </xs:complexType>
  </xs:element>
  <xs:simpleType name="ManufacturerModelCodeType">
   <xs:restriction base="xs:string">
    <xs:maxLength value="30" />
   </xs:restriction>
  </xs:simpleType>
  <xs:element name="VehicleRoot">
   <xs:complexType>
    <xs:sequence>
     <xs:element ref="Vehicle" maxOccurs="unbounded" minOccurs="1" />
    </xs:sequence>
   </xs:complexType>
  </xs:element>
 </xs:schema>
0
Comment
Question by:elucero
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 500 total points
ID: 37845426
You have a typo.  This:
<xs:element name="LowVolumne" type="xs:boolean" nillable="false" />
Should be:
<xs:element name="LowVolume" type="xs:boolean" nillable="false" />
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question