Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Incompatibility between schemas
Message
De
10/01/2006 23:25:42
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
XML
Titre:
Incompatibility between schemas
Divers
Thread ID:
01085488
Message ID:
01085488
Vues:
84
I am trying to obtain a schema from a dataset in a format that would preserve my field structure. When I CursorToXml() in VFP, I obtain this:
<xsd:schema id="VFPData" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
  <xsd:element name="VFPData" msdata:IsDataSet="true">
    <xsd:complexType>
      <xsd:choice maxOccurs="unbounded">
        <xsd:element name="temp" minOccurs="0" maxOccurs="unbounded">
          <xsd:complexType>
            <xsd:sequence>
              <xsd:element name="numero" type="xsd:int" /> 
              <xsd:element name="name">
                <xsd:simpleType>
                  <xsd:restriction base="xsd:string">
                    <xsd:maxLength value="40" /> 
                  </xsd:restriction>
                </xsd:simpleType>
              </xsd:element>
            </xsd:sequence>
          </xsd:complexType>
        </xsd:element>
      </xsd:choice>
      <xsd:anyAttribute namespace="http://www.w3.org/XML/1998/namespace" processContents="lax" /> 
    </xsd:complexType>
  </xsd:element>
</xsd:schema>
So, this contains the proper structure of my table. Thus, doing XmlToCursor() generates a cursor having the proper structure.

But, if I use .NET code only to generate that same data in a dataset and look at the schema, I have this:
<xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
  <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="Temp">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="numero" type="xs:int" minOccurs="0" /> 
              <xs:element name="name" type="xs:string" minOccurs="0" /> 
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
  </xs:element>
</xs:schema>
So, doing the same in VFP, with XmlToCursor(), gives an incorrect structure as I end up with a memo field in the name field. How can I have .NET to have the proper schema?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform