Since upgrading to VS 2005, when I right click on an xml database document that contains the schema, I no longer get a listing of the tables and cannot view the data contained in the tables. If I open the document created with VS2005 in VS2003, the grid populates fine. Thanks in advance for any replies.
The tables are created and added to the dataset like this.
DataTable dt = new DataTable("Table1");
DataColumn dc0 = new DataColumn("Field0", Type.GetType("System.Int64"));
dc0.AutoIncrement = true;
dc0.AutoIncrementSeed = 0;
dc0.AutoIncrementStep = 1;
dc0.Unique = true;
DataColumn dc1 = new DataColumn("Field1", Type.GetType("System.Int64"));
dc1.DefaultValue = -1;
DataColumn dc2 = new DataColumn("Field2", Type.GetType("System.String"));
dc2.Unique = true;
DataColumn dc3 = new DataColumn("Field3", Type.GetType("System.String"));
DataColumn dc4 = new DataColumn("Field4", Type.GetType("System.Boolean"));
dt.Columns.Add(dc0);
dt.Columns.Add(dc1);
dt.Columns.Add(dc2);
dt.Columns.Add(dc3);
dt.Columns.Add(dc4);
DataColumn[] aPrimaryKeyColumns = new DataColumn[1];
aPrimaryKeyColumns[0] = dt.Columns["Field0"];
dt.PrimaryKey = aPrimaryKeyColumns;
ds.Tables.Add(dt);
ds.AcceptChanges();
System.IO.StreamWriter sw = new System.IO.StreamWriter(strPath);
ds.WriteXml(sw, System.Data.XmlWriteMode.WriteSchema);
sw.Close();

View Data Grid (for xml database)
Mr-Asrawi
x_collins -
It looks like we're trying to get a repro for the issue now -- if you can send information regarding a repro for this issue on the product feedback site -- that would be great.
Karen
Robert Finch
no
If I open the xml database with the "View Data Grid" in the IDE, It reports that there is one table called 'Relationship' and that it contains no data. In reality the database contains 34 tables, none of which is named 'Relationship' and most of the tables have data.
There is no xsd file because the schema is included in the xml file.
Thanks for responding though.
ED_AY
Thank-you for responding. I have sent a sample app to the feedback group about a month ago. The sample has only one table, but demonstrates the issues. I haven't heard back from them yet.
I appreciate your offer to help, but do not want to waste your time.
Eric Stone
You can report bugs to MS here http://lab.msdn.microsoft.com/productfeedback/default.aspx
It also sounds strange about AutoIncrementStep, it must be working if you set AutoIncrement=true.
Gidion
x_collins -
could you post the link to the bug you submitted (I'll take a look at it internally to see what status it's at)
Windows Forms has a forum around datagridview and other data controls (http://forums.microsoft.com/MSDN/ShowForum.aspx ForumID=7&SiteID=1) which you can try in too.
Thanks,
Karen
Georgette Gibson
and other editors doesn't help
As I remember, VS can work with tabular data if XML do not contains nested elements. It doesn't care about schema, it simply treat your file as XML.
Still strange that older version works with it and newer don't.
Toop
MS will respond to bug reports, but it takes time (sometimes long
).
Nicolas Humann
I have reported the bug, but have not heard anything. I thought I would get a faster response here. This forum appears to have a very good closure rate.
My first post on this issue shows that the step is set to true. In VS2003, I didn’t have to set the seed or increment, 0 and 1 were the defaults.
I like many of the changes to VS2005, but issues like this supersede the convenience of refactoring and snippets. L Not everyone can afford to run an SQL server and I am not crazy about jet databases so I have been developing xml database apps for the last few years and up until now, have had good success.
SiraB
Alex Thaman
Thank-you for responding.
here is the url to the original bug report
http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx feedbackid=ec361d3f-6be6-4a26-a0dc-e9627cd4ae8b
I am hopeful that I submitted it in the right place.
thanks again
PhilCox
Hi!
You mean VS2005 can't open .XSD file
Letifix
I tried all the editors and none work correctly. I'm fairly certain that VS2005
has issues with the www.w3.org/2001/XMLSchema that it writes with
ds.WriteXml(sw, System.Data.XmlWriteMode.WriteSchema);
The VS2005 version of my app also ignores DataColumn.AutoIncrementStep = 1; and increments by a random value;
cranewang
I get the same results as with the 'view data grid' option. It is like it doesn't read the schema correctly. I also played with the schema settings in the document properties - no joy
Thank-you for trying to help
JRafe