473,320 Members | 1,841 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

DataSet/XmlSchema/DataGrid Framework 1.1 - 2.0 Problem

Hi,

I have a problem with reading an XmlSchema with Frameowk 2.0 and an
own DataType. I found no example
(searching two days).

What I do is:

DataSet dataSet = new DataSet();
dataSet.ReadXml("{path}/MySchemaAndData.xml");

dataView = dataSet.Tables[0];
dataGridView.DataSource = dataView;

Easy with Framework 1.1 (VisualStudio 2003). Everything is working
fine. Now with rameowrk 2.0 I get one
error after another, maybe someone can help me solve the problem,
knows a link or what ever. I'm really
despairing.

If need, i can write more information, what i tried unsuccesfully for
the last 20h.

The Schema looks like following:

<?xml version="1.0" encoding="ISO-8859-1"?>
<Data version="V1.0.0.0">
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" id="daten"
xmlns="" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="data" msdata:IsDataSet="true" msdata:Locale="de-
DE">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="aTableName" msdata:Expression="Column">
<xs:complexType>
<xs:attribute name="Column" type="xs:string"
type="xs:string" msdata:DataType="MyNamespace.MyClass, MyAssemlyName,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>/>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<aTableName Column="1"/>
</Data>

Feb 26 '07 #1
2 3674
"Martin Madreza" <ma*********@yahoo.dewrote in message
news:11*********************@q2g2000cwa.googlegrou ps.com...
Hi,

I have a problem with reading an XmlSchema with Frameowk 2.0 and an
own DataType. I found no example
(searching two days).
....
The Schema looks like following:

<?xml version="1.0" encoding="ISO-8859-1"?>
<Data version="V1.0.0.0">
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" id="daten"
xmlns="" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="data" msdata:IsDataSet="true" msdata:Locale="de-
DE">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="aTableName" msdata:Expression="Column">
<xs:complexType>
<xs:attribute name="Column" type="xs:string"
type="xs:string" msdata:DataType="MyNamespace.MyClass, MyAssemlyName,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>/>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<aTableName Column="1"/>
</Data>
As a first guess, I'd suggest you extract that schema from the data.
Secondly, your data does not match your schema. "Data" is not the same as
"data".

John
Feb 26 '07 #2
hi,

yes sorry, i copied the schema from the original and modified a litte
(from german tio english)...

i extract the dqata from the data set with a testproject, the result
is, that

'msdata:DataType="MyNamespace.MyClass, MyAssemlyName'

becomes an element. it's not possible to set them (in the dataset) to
an attribute. the element is under a xs:sequence, and the structur
changes...

so far it works. but i cant set the value from the schema. in the
example below column value 1 is never set. in 1.1 everything works,
now i found nothing about what changed in 2.0 and what i have to
change to make it work. does any example exist with DataType =
OwnDataType?

hope you can help me to come forward... and sorry for the bad example.
if something ambiguous, please tell and i try to specify it

here is the example

<?xml version="1.0" standalone="yes"?>
<data>
<xs:schema id="data" xmlns="" xmlns:xs="http://www.w3.org/2001/
XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="data" msdata:IsDataSet="true" msdata:Locale="de-
DE">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="aTableName">
<xs:complexType>
<xs:sequence>
<xs:element name="Column" type="xs:string"
msdata:DataType="MyNamespace.MyClass, MyAssemlyName, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null"/>/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<aTableName>
<Column>1</Column>
</aTableName>
</data>

Feb 27 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Max | last post by:
Suppose we have an object hierarchy in XSD. For example, let us take Control, Label, TextBox and LinkLabel windows controls. Each control has some properties which are represented as elements....
1
by: Marco Martin | last post by:
Hi everyone, I've got a dataset with a records table that is built up from scratch according to user input. I'm saving this dataset as xml by using...
4
by: Brian Keating | last post by:
wonder if anyone can help me here, i've a framework 1.1 dataset which i serialize in framework 1.1 and deserialize in framework 2.0. This is fine, problem is that i want to modify some of the...
3
by: Mae | last post by:
Dear All, I have a problem here, I'm using C# Webform calling a webservices. The webservices return me a XMLnode, using this XMLnode I want to convert it to dataset so I can bind to the...
2
by: Steve | last post by:
I would not have thought that getting a DataGrid connected to a DataSet (read in from an XML file) would be this complicated. I cannot get this to work. I have read everything I could find and...
2
by: MarkAurit | last post by:
How does one go about getting the information from an .xsd file into a WSDL document? I have a web service that creates a simple object that IBM Websphere can see and use. Great. However, when I...
22
by: Arne | last post by:
How do I pass a dataset to a webservices? I need to submit a shoppingcart from a pocket PC to a webservice. What is the right datatype? II have tried dataset as a datatype, but I can't get it to...
3
by: David P. Donahue | last post by:
I'm re-writing an application in C# that was originally written in Delphi 7. The heart of the application is a DataSet displayed in a DataGrid. One of the main functions of the previous...
1
by: Angel \Java\ Lopez | last post by:
Hi people! I'm running a Visual Studio 2005, Professional, on Windows XP Professional. I've found a little big problem, reading a DataSet. If I try: ds.ReadXml("c:\data.xml") it raises...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.