Solved

cannot load field from xml source

Posted on 2012-04-13
1
286 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
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video discusses moving either the default database or any database to a new volume.

758 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now