Solved

cannot load field from xml source

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Introduction This article will provide a solution for an error that might occur installing a new SQL 2005 64-bit cluster. This article will assume that you are fully prepared to complete the installation and describes the error as it occurred durin…
In this article I will describe the Copy Database Wizard 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.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

856 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