?
Solved

Hidden field in XSD ?

Posted on 2009-04-23
2
Medium Priority
?
450 Views
Last Modified: 2013-11-26
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?
0
Comment
Question by:pillmill
2 Comments
 
LVL 21

Accepted Solution

by:
MogalManic earned 2000 total points
ID: 24223644
Can we see the XSD files in question?
0
 

Author Comment

by:pillmill
ID: 24226667
Yes, here is an edited version.

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="..\vueSchema\baseTypes.xsd" />
  <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>
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

840 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