Dear List,
Is it possible to have a schema with tables of the same name? I need to
build an XML document based on the following schema -
<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="Recordlist"
targetNamespace="http://tempuri.org/Recordlist.xsd"
elementFormDefault="qualified" xmlns="http://tempuri.org/Recordlist.xsd"
xmlns:mstns="http://tempuri.org/Recordlist.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="recordlist">
<xs:complexType>
<xs:sequence>
<xs:element name="Loader">
<xs:complexType>
<xs:sequence>
<xs:element name="Application" type="xs:string" />
<xs:element name="Date" type="xs:string" />
<xs:element name="SourceFilename" type="xs:string" />
<xs:element name="DataInterchangeCode" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="PriceMatrix">
<xs:complexType>
<xs:sequence>
<xs:element name="Command" type="xs:string" />
<xs:element name="Data">
<xs:complexType>
<xs:sequence>
<xs:element name="Price_desc" type="xs:string" />
<xs:element name="Prgr_code" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Function">
<xs:complexType>
<xs:sequence>
<xs:element name="FunctionName" type="xs:string" />
<xs:element name="FunctionDesc" type="xs:string" />
<xs:element name="FieldName" type="xs:string" />
<xs:element name="FieldValue" type="xs:string" />
<xs:element name="FunctionBeforeInsert" type="xs:string"
/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="PricePeriod">
<xs:complexType>
<xs:sequence>
<xs:element name="Command" type="xs:string" />
<xs:element name="Data">
<xs:complexType>
<xs:sequence>
<xs:element name="Prpe_from" type="xs:string" />
<xs:element name="Prpe_to" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element maxOccurs="unbounded" name="Function">
<xs:complexType>
<xs:sequence>
<xs:element name="FunctionName" type="xs:string" />
<xs:element name="FunctionDesc" type="xs:string" />
<xs:element name="FieldName" type="xs:string" />
<xs:element name="FieldValue" type="xs:string" />
<xs:element name="FunctionBeforeInsert"
type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="PriceProperty">
<xs:complexType>
<xs:sequence>
<xs:element name="Command" type="xs:string" />
<xs:element name="Data">
<xs:complexType>
<xs:sequence>
<xs:element name="Pro_type" type="xs:string"
/>
<xs:element name="Bed_room"
type="xs:unsignedByte" />
<xs:element name="Jbt_type" type="xs:string"
/>
<xs:element name="Prpr_sell"
type="xs:decimal" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element maxOccurs="unbounded" name="Function">
<xs:complexType>
<xs:sequence>
<xs:element name="FunctionName"
type="xs:string" />
<xs:element name="FunctionDesc"
type="xs:string" />
<xs:element name="FieldName"
type="xs:string" />
<xs:element name="FieldValue"
type="xs:string" />
<xs:element name="FunctionBeforeInsert"
type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="PriceSplit">
<xs:complexType>
<xs:sequence>
<xs:element name="Command" type="xs:string" />
<xs:element name="Data">
<xs:complexType>
<xs:sequence>
<xs:element name="sptp_code"
type="xs:string" />
<xs:element name="prsp_sell"
type="xs:decimal" />
<xs:element name="vat_code"
type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element maxOccurs="unbounded"
name="Function">
<xs:complexType>
<xs:sequence>
<xs:element name="FunctionName"
type="xs:string" />
<xs:element name="FunctionDesc"
type="xs:string" />
<xs:element name="FieldName"
type="xs:string" />
<xs:element name="FieldValue"
type="xs:string" />
<xs:element
name="FunctionBeforeInsert" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
This schema has elements of the same name. When I come to populate my
DataSet tables with data it is not possible to discriminate between the
tables with the same name? Is this correct?
For example, if I want to create a new row of data for the 'Data' table
belonging to the PriceMatrix I would write -
DataRow dr = dsPricing.Tables["Data"].NewRow();
dr["Price_desc"] = jobtype;
dr["Prgr_code"] = sponsor;
dsPricing.Tables["Data"].Rows.Add(dr);
dsPricing.AcceptChanges();
But how do the different tables called "Data" get kept seperate?
Thanks for any helps,
David 2 1260
I don't believe that you can create a DataSet out of a schema like that. You
may be stuck treating it like XML.
John
"David++" <Da***@discussions.microsoft.comwrote in message
news:92**********************************@microsof t.com...
Dear List,
Is it possible to have a schema with tables of the same name? I need to
build an XML document based on the following schema -
<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="Recordlist"
targetNamespace="http://tempuri.org/Recordlist.xsd"
elementFormDefault="qualified" xmlns="http://tempuri.org/Recordlist.xsd"
xmlns:mstns="http://tempuri.org/Recordlist.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="recordlist">
<xs:complexType>
<xs:sequence>
<xs:element name="Loader">
<xs:complexType>
<xs:sequence>
<xs:element name="Application" type="xs:string" />
<xs:element name="Date" type="xs:string" />
<xs:element name="SourceFilename" type="xs:string" />
<xs:element name="DataInterchangeCode" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="PriceMatrix">
<xs:complexType>
<xs:sequence>
<xs:element name="Command" type="xs:string" />
<xs:element name="Data">
<xs:complexType>
<xs:sequence>
<xs:element name="Price_desc" type="xs:string" />
<xs:element name="Prgr_code" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Function">
<xs:complexType>
<xs:sequence>
<xs:element name="FunctionName" type="xs:string" />
<xs:element name="FunctionDesc" type="xs:string" />
<xs:element name="FieldName" type="xs:string" />
<xs:element name="FieldValue" type="xs:string" />
<xs:element name="FunctionBeforeInsert"
type="xs:string"
/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="PricePeriod">
<xs:complexType>
<xs:sequence>
<xs:element name="Command" type="xs:string" />
<xs:element name="Data">
<xs:complexType>
<xs:sequence>
<xs:element name="Prpe_from" type="xs:string" />
<xs:element name="Prpe_to" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element maxOccurs="unbounded" name="Function">
<xs:complexType>
<xs:sequence>
<xs:element name="FunctionName" type="xs:string"
/>
<xs:element name="FunctionDesc" type="xs:string"
/>
<xs:element name="FieldName" type="xs:string" />
<xs:element name="FieldValue" type="xs:string" />
<xs:element name="FunctionBeforeInsert"
type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="PriceProperty">
<xs:complexType>
<xs:sequence>
<xs:element name="Command" type="xs:string" />
<xs:element name="Data">
<xs:complexType>
<xs:sequence>
<xs:element name="Pro_type"
type="xs:string"
/>
<xs:element name="Bed_room"
type="xs:unsignedByte" />
<xs:element name="Jbt_type"
type="xs:string"
/>
<xs:element name="Prpr_sell"
type="xs:decimal" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element maxOccurs="unbounded"
name="Function">
<xs:complexType>
<xs:sequence>
<xs:element name="FunctionName"
type="xs:string" />
<xs:element name="FunctionDesc"
type="xs:string" />
<xs:element name="FieldName"
type="xs:string" />
<xs:element name="FieldValue"
type="xs:string" />
<xs:element name="FunctionBeforeInsert"
type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="PriceSplit">
<xs:complexType>
<xs:sequence>
<xs:element name="Command" type="xs:string"
/>
<xs:element name="Data">
<xs:complexType>
<xs:sequence>
<xs:element name="sptp_code"
type="xs:string" />
<xs:element name="prsp_sell"
type="xs:decimal" />
<xs:element name="vat_code"
type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element maxOccurs="unbounded"
name="Function">
<xs:complexType>
<xs:sequence>
<xs:element name="FunctionName"
type="xs:string" />
<xs:element name="FunctionDesc"
type="xs:string" />
<xs:element name="FieldName"
type="xs:string" />
<xs:element name="FieldValue"
type="xs:string" />
<xs:element
name="FunctionBeforeInsert" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
This schema has elements of the same name. When I come to populate my
DataSet tables with data it is not possible to discriminate between the
tables with the same name? Is this correct?
For example, if I want to create a new row of data for the 'Data' table
belonging to the PriceMatrix I would write -
DataRow dr = dsPricing.Tables["Data"].NewRow();
dr["Price_desc"] = jobtype;
dr["Prgr_code"] = sponsor;
dsPricing.Tables["Data"].Rows.Add(dr);
dsPricing.AcceptChanges();
But how do the different tables called "Data" get kept seperate?
Thanks for any helps,
David
I believe you may be right :-( Ah well, back to the drawing board...
Cheers,
David
"John Saunders" wrote:
I don't believe that you can create a DataSet out of a schema like that. You
may be stuck treating it like XML.
John
"David++" <Da***@discussions.microsoft.comwrote in message
news:92**********************************@microsof t.com...
Dear List,
Is it possible to have a schema with tables of the same name? I need to
build an XML document based on the following schema -
<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="Recordlist"
targetNamespace="http://tempuri.org/Recordlist.xsd"
elementFormDefault="qualified" xmlns="http://tempuri.org/Recordlist.xsd"
xmlns:mstns="http://tempuri.org/Recordlist.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="recordlist">
<xs:complexType>
<xs:sequence>
<xs:element name="Loader">
<xs:complexType>
<xs:sequence>
<xs:element name="Application" type="xs:string" />
<xs:element name="Date" type="xs:string" />
<xs:element name="SourceFilename" type="xs:string" />
<xs:element name="DataInterchangeCode" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="PriceMatrix">
<xs:complexType>
<xs:sequence>
<xs:element name="Command" type="xs:string" />
<xs:element name="Data">
<xs:complexType>
<xs:sequence>
<xs:element name="Price_desc" type="xs:string" />
<xs:element name="Prgr_code" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Function">
<xs:complexType>
<xs:sequence>
<xs:element name="FunctionName" type="xs:string" />
<xs:element name="FunctionDesc" type="xs:string" />
<xs:element name="FieldName" type="xs:string" />
<xs:element name="FieldValue" type="xs:string" />
<xs:element name="FunctionBeforeInsert"
type="xs:string"
/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="PricePeriod">
<xs:complexType>
<xs:sequence>
<xs:element name="Command" type="xs:string" />
<xs:element name="Data">
<xs:complexType>
<xs:sequence>
<xs:element name="Prpe_from" type="xs:string" />
<xs:element name="Prpe_to" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element maxOccurs="unbounded" name="Function">
<xs:complexType>
<xs:sequence>
<xs:element name="FunctionName" type="xs:string"
/>
<xs:element name="FunctionDesc" type="xs:string"
/>
<xs:element name="FieldName" type="xs:string" />
<xs:element name="FieldValue" type="xs:string" />
<xs:element name="FunctionBeforeInsert"
type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="PriceProperty">
<xs:complexType>
<xs:sequence>
<xs:element name="Command" type="xs:string" />
<xs:element name="Data">
<xs:complexType>
<xs:sequence>
<xs:element name="Pro_type"
type="xs:string"
/>
<xs:element name="Bed_room"
type="xs:unsignedByte" />
<xs:element name="Jbt_type"
type="xs:string"
/>
<xs:element name="Prpr_sell"
type="xs:decimal" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element maxOccurs="unbounded"
name="Function">
<xs:complexType>
<xs:sequence>
<xs:element name="FunctionName"
type="xs:string" />
<xs:element name="FunctionDesc"
type="xs:string" />
<xs:element name="FieldName"
type="xs:string" />
<xs:element name="FieldValue"
type="xs:string" />
<xs:element name="FunctionBeforeInsert"
type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="PriceSplit">
<xs:complexType>
<xs:sequence>
<xs:element name="Command" type="xs:string"
/>
<xs:element name="Data">
<xs:complexType>
<xs:sequence>
<xs:element name="sptp_code"
type="xs:string" />
<xs:element name="prsp_sell"
type="xs:decimal" />
<xs:element name="vat_code"
type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element maxOccurs="unbounded"
name="Function">
<xs:complexType>
<xs:sequence>
<xs:element name="FunctionName"
type="xs:string" />
<xs:element name="FunctionDesc"
type="xs:string" />
<xs:element name="FieldName"
type="xs:string" />
<xs:element name="FieldValue"
type="xs:string" />
<xs:element
name="FunctionBeforeInsert" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
This schema has elements of the same name. When I come to populate my
DataSet tables with data it is not possible to discriminate between the
tables with the same name? Is this correct?
For example, if I want to create a new row of data for the 'Data' table
belonging to the PriceMatrix I would write -
DataRow dr = dsPricing.Tables["Data"].NewRow();
dr["Price_desc"] = jobtype;
dr["Prgr_code"] = sponsor;
dsPricing.Tables["Data"].Rows.Add(dr);
dsPricing.AcceptChanges();
But how do the different tables called "Data" get kept seperate?
Thanks for any helps,
David
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: bdj |
last post by:
Hello!
Can anyone tell me where to read more about best practices about this:
Should I put data in a seperate scheme for tables,
packages in anoter schema
and create a lot of users that have...
|
by: Stanimir Stamenkov |
last post by:
Using Xerces2 Java I'm trying to validate a CSV data following an
XNI example
<http://xml.apache.org/xerces2-j/xni-config.html#examples>. The CSV
scanner generates XML tree events like:
<csv>...
|
by: btober |
last post by:
Is there a way to get a dump of all the DDL and data associated with a
single schema within a database?
What I tried in attempting to hack this out was
\dt consume.*
and
\dv consume.*
|
by: N. Shamsundar |
last post by:
In DB2 V8.1.5, if one uses SET SCHEMA to a schema other than the default
schema, and subsequently issues a LIST TABLES command, it is still the
tables in the default schema that are shown. Is this...
|
by: Robert Stearns |
last post by:
I ran the following bit of SQL and my PRIMARY KEY wound up in schema
SYSIBM called SQL.... not schema is3 called primary. The index
registation did wind up there. Obviously there's something I...
|
by: dave71 |
last post by:
Hi
Could someone please advise me how to remove the schema name from
linked tables within Access. For example when I connect to a Oracle
database via Microsoft ODCB for Oracle the list of...
|
by: athos |
last post by:
Hi guys, please help.
What I did is :
Step1. create a Database named , it's default owner is
Step2. create a User in Database named , which maps
to the Login on this Database Server, it's a...
|
by: athos |
last post by:
Hi guys, please help.
What I did is :
Step1. create a Database named , it's default owner is
Step2. create a User in Database named , which maps
to the Login on this Database Server, it's a...
|
by: Gladiator |
last post by:
Hi ,
I was trying to find the size of a schema (Size of all the tables in a
schema). Can some one tell me an easy way to do this. There are more
than 200 tables in my schema and it is very...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |