ZOEmcai9mh3
Technical User
I am trying to import an xml file into an application.
When I run this code it works fine:
<?xml version="1.0" encoding="utf-8"?>
<Star>
<StarUser INumber="598623457">
<Staff>
<studentNumber>333</studentNumber>
<cpso>888</cpso>
</Staff>
</StarUser>
</Star>
but if I use any other field in place of INumber I get an error:
The Xml Data Import failed : : Object cannot be cast from DBNull to other types.
Here is the relevant part of the schema:
<xs:attribute name="UserId" type="xs:string" use="optional" />
<xs:attribute name="externalId" type="xs:string" use="optional" />
<xs:attribute name="UnivEmployeeId" type="xs:string" use="optional" />
<xs:attribute name="UnivStudentId" type="xs:string" use="optional" />
<xs:attribute name="FirstName" type="xs:string" use="optional" />
<xs:attribute name="LastName" type="xs:string" use="optional" />
<xs:attribute name="BirthYear" type="xs:string" use="optional" />
<xs:attribute name="BirthMonth" type="xs:string" use="optional" />
<xs:attribute name="BirthDay" type="xs:string" use="optional" />
<xs:attribute name="CpsId" type="xs:string" use="optional" />
<xs:attribute name="INumber" type="xs:string" use="optional" />
I thought I should be able to use any these fields as the identifier - but for some reason it only lets me use INumber.
Any Ideas why?
When I run this code it works fine:
<?xml version="1.0" encoding="utf-8"?>
<Star>
<StarUser INumber="598623457">
<Staff>
<studentNumber>333</studentNumber>
<cpso>888</cpso>
</Staff>
</StarUser>
</Star>
but if I use any other field in place of INumber I get an error:
The Xml Data Import failed : : Object cannot be cast from DBNull to other types.
Here is the relevant part of the schema:
<xs:attribute name="UserId" type="xs:string" use="optional" />
<xs:attribute name="externalId" type="xs:string" use="optional" />
<xs:attribute name="UnivEmployeeId" type="xs:string" use="optional" />
<xs:attribute name="UnivStudentId" type="xs:string" use="optional" />
<xs:attribute name="FirstName" type="xs:string" use="optional" />
<xs:attribute name="LastName" type="xs:string" use="optional" />
<xs:attribute name="BirthYear" type="xs:string" use="optional" />
<xs:attribute name="BirthMonth" type="xs:string" use="optional" />
<xs:attribute name="BirthDay" type="xs:string" use="optional" />
<xs:attribute name="CpsId" type="xs:string" use="optional" />
<xs:attribute name="INumber" type="xs:string" use="optional" />
I thought I should be able to use any these fields as the identifier - but for some reason it only lets me use INumber.
Any Ideas why?