473,385 Members | 1,192 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,385 software developers and data experts.

invalid name with XSD, XML, and DataSet

I understand it is possible to take a valid schema & the XML data and load a data set. The XSD I use in another program to deserialize & serialize my XML.

But when I try this code I get this error message ... how do I fix it ?? I dont see a name for the DataSet ds
and as I see it, the table must be grabbing the name from the XML schema

{"The name 'transactions' is invalid. A DataSet cannot have the same name of the DataTable."

DataSet ds = new DataSet()
try

FileStream finschema= new FileStream(schemaPath,FileMode.Open,FileAccess.Rea d,FileShare.Read)
ds.ReadXmlSchema(finschema);
finschema.Close()

FileStream findata= new FileStream( dataPath,FileMode.Open,FileAccess.Read,FileShare.R ead)
ds.ReadXmlSchema(findata); // error here..
findata.Close()
catch (Exception e

Console.WriteLine(e.Message)

return ds

Thanks Andrew
Nov 16 '05 #1
0 1215

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

Similar topics

3
by: Sunny | last post by:
Hi, I'm using VS.net 2003 and C#. I created (using buildin designer) a dataset with 2 tables. TableOne has 2 fields: sName and sTable (both string) and a primary key TestKey, set on sName....
1
by: Dave | last post by:
Hi all, I've seen that many people have had this exact same problem in the past, but no-one seems to post the answer when (if) they solve it... so here we go again. If I create a strongly...
1
by: jk | last post by:
I need help in writing a datatable as xml in an aspx page. I have an excel client that opens the response as a stream into a recordset. In converting this code to .net c# from asp vb (where is used...
0
by: Deep Purple | last post by:
I started with the following error... ------------------------------------------------------- An error occured while loading the schema with TargetNamespace 'http://www.w3.org/2001/XMLSchema'...
3
by: Reb | last post by:
Hi, I am using MSSQL server 2000. When i am running my code, i am getting the error System.Data.SqlClient.SqlException: Invalid object name 'Item' where Item is the name of a table. It seems...
0
by: andrewcw | last post by:
I understand it is possible to take a valid schema & the XML data and load a data set. The XSD I use in another program to deserialize & serialize my XML. But when I try this code I get this error...
3
by: Anders Jansson | last post by:
Hi all. I have 2 problems when I try to open and convert an ASP.NET VS 2003 web-applikation in VS 2005. In VS 2003 I have no problems at all! First: One subfolder with will not be converted!...
0
by: Antonio | last post by:
Hello, everyone. I am getting an "Invalid CurrentPageIndex value. It must be >= 0 and < the PageCount." error message when I click on the Edit button on any pages in the datagrid besides the first...
1
mahet
by: mahet | last post by:
Anders Jansson was a guest here, and he was having problem: When I try to build the web, this error is displayed: ---> Error 5 Unable to convert input xml file content to a DataSet. Invalid...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.