pillmill
asked on
Hidden field in XSD ?
I have apparently identical xsd tables on two systems.
The code differs only in one line.
One system runs correctly with the following line of code:
crow["USER_Id"] = row["USER_Id"];
The other system throws an error:
"'USER_Id' does not belong to table CAM"
The field "USER_Id" cannot be found by searching the complete collection
of xsd files in the schemas on either of the two systems.
The schema is identical on both systems.
What is going on? Are there hidden fields in the xsd?
The code differs only in one line.
One system runs correctly with the following line of code:
crow["USER_Id"] = row["USER_Id"];
The other system throws an error:
"'USER_Id' does not belong to table CAM"
The field "USER_Id" cannot be found by searching the complete collection
of xsd files in the schemas on either of the two systems.
The schema is identical on both systems.
What is going on? Are there hidden fields in the xsd?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The problem occurs when using the variable USER_Id with the table CAM_COLLECTION.
It runs with out error on one system, but throws an exception on another apparently identical system.
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://schemas.a.com/baseTypes" xmlns="http://schemas.a.com/userType" xmlns:ns2="http://schemas.a.com/userViews" xmlns:ns3="http://schemas.a.com/userCAMs" xmlns:NS="http://schemas.a.com/userType" targetNamespace="http://schemas.a.com/userType">
<xs:import namespace="http://schemas.a.com/baseTypes" schemaLocation="..\vueSche
<xs:complexType name="userCAMs">
<xs:sequence>
<xs:element name="CAM_ADDRESS" type="xs:long" />
<xs:element name="CAM_LOCATION">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="CAM_ALIAS">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="ACTIVE" type="xs:boolean" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="userViews">
<xs:sequence>
<xs:element name="VIEW_NAME">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="20" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="DISPLAYED_CAM_SIZE" type="xs:int" />
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="S" />
<xs:enumeration value="M" />
<xs:enumeration value="L" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="CAM_OBJECT_ORDER">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="20" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="CAMS_IN_VIEW" type="userCAMs" />
<xs:element name="userID" type="xs:int" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="userTypeType">
<xs:sequence>
<xs:element name="reader_NUMBER" type="xs:string" />
<xs:element name="TYPE">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="AD" />
<xs:enumeration value="F" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="NAME" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="userType">
<xs:annotation>
<xs:documentation>user type</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="USER_NAME">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
<xs:minLength value="1" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="EMAIL" type="ns1:email" />
<xs:element name="PASS">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:minLength value="4" />
<xs:maxLength value="20" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="LAST_ACCESS" type="xs:dateTime" />
<xs:element name="USER_TYPES" type="userTypeType" />
<xs:element name="USER_GATEWAYS" type="userGate" />
<xs:element name="USER_VIEWS" type="userViews" />
<xs:element name="CAM_COLLECTION" type="userCAMs" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="userGate">
<xs:sequence>
<xs:element name="reader_NUMBER" type="xs:string" />
<xs:element name="TYPE">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="AD" />
<xs:enumeration value="F" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="GATE_ADDRESS" type="xs:long" />
<xs:element name="GATE_LOCATION">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="GATEWAY_ACTIVE" />
<xs:element name="GATEWAY_ALIAS">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="CAM" type="xs:string" />
<xs:element name="FIRM_REV" type="xs:long" />
<xs:element name="LOCAL_IP" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="newUserType">
<xs:sequence>
<xs:element name="USER_NAME">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="EMAIL">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="PASS">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="20" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="LAST_ACCESS" type="xs:dateTime" />
<xs:element name="USER_GATE" type="userGate" />
<xs:any />
<xs:element name="FIRM_REV" type="xs:long">
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:schema>