Click here to Skip to main content
Click here to Skip to main content
Articles » Languages » VB.NET » Applications » Downloads
 
Add your own
alternative version

Xml Database Demo

, 31 Jul 2008
This article walks you through creating a simple windows database with an Xml file as it's datasource.
XmlDatabaseDemo.zip
XmlDatabaseDemo
XmlDatabaseDemo
bin
Debug
XmlDatabaseDemo.exe
XmlDatabaseDemo.pdb
XmlDatabaseDemo.vshost.exe
DsXmlDbDemo.xsc
DsXmlDbDemo.xss
My Project
Application.myapp
Settings.settings
obj
Debug
TempPE
DsXmlDbDemo.Designer.vb.dll
My Project.Resources.Designer.vb.dll
XmlDatabaseDemo.exe
XmlDatabaseDemo.Form1.resources
XmlDatabaseDemo.pdb
XmlDatabaseDemo.Resources.resources
XmlDatabaseDemo.vbproj.GenerateResource.Cache
XmlDatabaseDemo.suo
<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="DsXmlDbDemo" targetNamespace="http://tempuri.org/DsXmlDbDemo.xsd" xmlns:mstns="http://tempuri.org/DsXmlDbDemo.xsd" xmlns="http://tempuri.org/DsXmlDbDemo.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
        </Connections>
        <Tables>
        </Tables>
        <Sources>
        </Sources>
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="DsXmlDbDemo" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:Generator_UserDSName="DsXmlDbDemo" msprop:Generator_DataSetName="DsXmlDbDemo">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="Customers" msprop:Generator_UserTableName="Customers" msprop:Generator_RowDeletedName="CustomersRowDeleted" msprop:Generator_RowChangedName="CustomersRowChanged" msprop:Generator_RowClassName="CustomersRow" msprop:Generator_RowChangingName="CustomersRowChanging" msprop:Generator_RowEvArgName="CustomersRowChangeEvent" msprop:Generator_RowEvHandlerName="CustomersRowChangeEventHandler" msprop:Generator_TableClassName="CustomersDataTable" msprop:Generator_TableVarName="tableCustomers" msprop:Generator_RowDeletingName="CustomersRowDeleting" msprop:Generator_TablePropName="Customers">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="CustomerId" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="CustomerId" msprop:Generator_ColumnPropNameInRow="CustomerId" msprop:Generator_ColumnVarNameInTable="columnCustomerId" msprop:Generator_ColumnPropNameInTable="CustomerIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="Name" msprop:Generator_UserColumnName="Name" msprop:Generator_ColumnPropNameInRow="Name" msprop:Generator_ColumnVarNameInTable="columnName" msprop:Generator_ColumnPropNameInTable="NameColumn" type="xs:string" minOccurs="0" />
              <xs:element name="Address1" msprop:Generator_UserColumnName="Address1" msprop:Generator_ColumnPropNameInRow="Address1" msprop:Generator_ColumnVarNameInTable="columnAddress1" msprop:Generator_ColumnPropNameInTable="Address1Column" type="xs:string" minOccurs="0" />
              <xs:element name="Address2" msprop:Generator_UserColumnName="Address2" msprop:Generator_ColumnPropNameInRow="Address2" msprop:Generator_ColumnVarNameInTable="columnAddress2" msprop:Generator_ColumnPropNameInTable="Address2Column" type="xs:string" minOccurs="0" />
              <xs:element name="City" msprop:Generator_UserColumnName="City" msprop:Generator_ColumnPropNameInRow="City" msprop:Generator_ColumnVarNameInTable="columnCity" msprop:Generator_ColumnPropNameInTable="CityColumn" type="xs:string" minOccurs="0" />
              <xs:element name="St" msprop:Generator_UserColumnName="St" msprop:Generator_ColumnPropNameInRow="St" msprop:Generator_ColumnVarNameInTable="columnSt" msprop:Generator_ColumnPropNameInTable="StColumn" type="xs:string" minOccurs="0" />
              <xs:element name="Zip" msprop:Generator_UserColumnName="Zip" msprop:Generator_ColumnPropNameInRow="Zip" msprop:Generator_ColumnVarNameInTable="columnZip" msprop:Generator_ColumnPropNameInTable="ZipColumn" type="xs:string" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="Orders" msprop:Generator_UserTableName="Orders" msprop:Generator_RowDeletedName="OrdersRowDeleted" msprop:Generator_RowChangedName="OrdersRowChanged" msprop:Generator_RowClassName="OrdersRow" msprop:Generator_RowChangingName="OrdersRowChanging" msprop:Generator_RowEvArgName="OrdersRowChangeEvent" msprop:Generator_RowEvHandlerName="OrdersRowChangeEventHandler" msprop:Generator_TableClassName="OrdersDataTable" msprop:Generator_TableVarName="tableOrders" msprop:Generator_RowDeletingName="OrdersRowDeleting" msprop:Generator_TablePropName="Orders">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="OrderId" msdata:AutoIncrement="true" msprop:Generator_UserColumnName="OrderId" msprop:Generator_ColumnPropNameInRow="OrderId" msprop:Generator_ColumnVarNameInTable="columnOrderId" msprop:Generator_ColumnPropNameInTable="OrderIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="CustomerId" msprop:Generator_UserColumnName="CustomerId" msprop:Generator_ColumnPropNameInRow="CustomerId" msprop:Generator_ColumnVarNameInTable="columnCustomerId" msprop:Generator_ColumnPropNameInTable="CustomerIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="Item" msprop:Generator_UserColumnName="Item" msprop:Generator_ColumnPropNameInRow="Item" msprop:Generator_ColumnVarNameInTable="columnItem" msprop:Generator_ColumnPropNameInTable="ItemColumn" type="xs:string" minOccurs="0" />
              <xs:element name="Quantity" msprop:Generator_UserColumnName="Quantity" msprop:Generator_ColumnPropNameInRow="Quantity" msprop:Generator_ColumnVarNameInTable="columnQuantity" msprop:Generator_ColumnPropNameInTable="QuantityColumn" type="xs:int" minOccurs="0" />
              <xs:element name="Price" msprop:Generator_UserColumnName="Price" msprop:Generator_ColumnPropNameInRow="Price" msprop:Generator_ColumnVarNameInTable="columnPrice" msprop:Generator_ColumnPropNameInTable="PriceColumn" type="xs:double" minOccurs="0" />
              <xs:element name="Total" msdata:ReadOnly="true" msdata:Expression="Quantity*Price" msprop:Generator_UserColumnName="Total" msprop:Generator_ColumnPropNameInRow="Total" msprop:Generator_ColumnVarNameInTable="columnTotal" msprop:Generator_ColumnPropNameInTable="TotalColumn" type="xs:double" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
    <xs:unique name="Constraint1">
      <xs:selector xpath=".//mstns:Customers" />
      <xs:field xpath="mstns:CustomerId" />
    </xs:unique>
    <xs:unique name="Orders_Constraint1" msdata:ConstraintName="Constraint1">
      <xs:selector xpath=".//mstns:Orders" />
      <xs:field xpath="mstns:OrderId" />
    </xs:unique>
    <xs:keyref name="FK_Customers_Orders" refer="Constraint1" msprop:rel_Generator_UserRelationName="FK_Customers_Orders" msprop:rel_Generator_RelationVarName="relationFK_Customers_Orders" msprop:rel_Generator_UserChildTable="Orders" msprop:rel_Generator_UserParentTable="Customers" msprop:rel_Generator_ParentPropName="CustomersRow" msprop:rel_Generator_ChildPropName="GetOrdersRows">
      <xs:selector xpath=".//mstns:Orders" />
      <xs:field xpath="mstns:CustomerId" />
    </xs:keyref>
  </xs:element>
</xs:schema>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

CS Rocks
Software Developer DataPrint, LLC
United States United States

| Advertise | Privacy | Mobile
Web01 | 2.8.140821.2 | Last Updated 31 Jul 2008
Article Copyright 2008 by CS Rocks
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid