473,796 Members | 2,648 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Da taSource = 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="u rn:schemas-microsoft-com:xml-msdata">
<xs:element name="data" msdata:IsDataSe t="true" msdata:Locale=" de-
DE">
<xs:complexType >
<xs:choice maxOccurs="unbo unded">
<xs:element name="aTableNam e" msdata:Expressi on="Column">
<xs:complexType >
<xs:attribute name="Column" type="xs:string "
type="xs:string " msdata:DataType ="MyNamespace.M yClass, 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 3698
"Martin Madreza" <ma*********@ya hoo.dewrote in message
news:11******** *************@q 2g2000cwa.googl egroups.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="u rn:schemas-microsoft-com:xml-msdata">
<xs:element name="data" msdata:IsDataSe t="true" msdata:Locale=" de-
DE">
<xs:complexType >
<xs:choice maxOccurs="unbo unded">
<xs:element name="aTableNam e" msdata:Expressi on="Column">
<xs:complexType >
<xs:attribute name="Column" type="xs:string "
type="xs:string " msdata:DataType ="MyNamespace.M yClass, 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:DataTyp e="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="u rn:schemas-microsoft-com:xml-msdata">
<xs:element name="data" msdata:IsDataSe t="true" msdata:Locale=" de-
DE">
<xs:complexType >
<xs:choice minOccurs="0" maxOccurs="unbo unded">
<xs:element name="aTableNam e">
<xs:complexType >
<xs:sequence>
<xs:element name="Column" type="xs:string "
msdata:DataType ="MyNamespace.M yClass, 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
5084
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. Some of the elements are of complex types as well, like bounds - of type rectangle. (See full example in the bottom of the letter.) DataSet.ReadXMLSchema fails to parse such XSD file. The problem is caused by complex type as an element of the...
1
1913
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 dsRecords.WriteXml(dlgSave.FileName,XmlWriteMode.WriteSchema); The first problem I had was that all hidden columns (ie: recordID) values were not written to file. So I set the mapping types of the hidden columns back to "Element" just before saving.
4
7488
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 records in framework 2.0 and serialize the data so framework 1.1 can deserialize it and do what it required. Is this possible?
3
5060
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 datagrid, by extracting the <CustomerData></CustomerData> block from the xmlnode. Below is the sample of xmlnode return from webservices. <?xml version="1.0" encoding="utf-8"?>
2
1430
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 modeled all the examples given but this grid just refuses to behave nicely. The code is listed below as well as the XML schema and XML data. The connection between the data set and grid seems to work just fine. What won't work is the display...
2
5666
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 expose a DataSet, Websphere cant use the WSDL document, as it doesnt describe the data elments in the dataset. Im done a lot of readying and looking at posts, and typed datasets sounds like they might be the answer, but I cant figure out how to...
22
25607
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 compile. <WebMethod()> _ Public Function VerifySku(ByVal skus As XmlDataDocument) As DataSet Test program : Dim cartSet As DataSet cartSet = ws.VerifySku(cartSet)
3
2056
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 application was to save the data to a file (it was XML, but the format is unimportant) that can be re-loaded into the DataSet at a later time. (The reason for this was that the queries which populate the DataSet can take a while to run, and people...
1
3825
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 the exception ONLY in Web Sites:
0
9684
marktang
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9530
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10459
Oralloy
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10236
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10017
tracyyun
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5445
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5577
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3734
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2928
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.