locked
Parser Error: persisted schema file is corrupted, trying to add city field RRS feed

  • Question

  • User-557590556 posted

    Hi.  I'm trying to add a second Locations field.  The originial field will be for state and the new one will be for cities.  I'm basically duplicating the "locations" code whereever I see it and using "Cities" in place of "Locations"  I understand there are 10 files to update and I am not done yet.  I'm getting the following error when checking progress on my local server.

    Parser Error

    Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

    Parser Error Message: Unable to convert input xml file content to a DataSet. Cannot match DbTable Cities to a DataTable in the DataSet, the persisted schema file is corrupted.

    Source Error:

    Line 1:  <?xml version="1.0" encoding="utf-8"?>
    Line 2:  <xs:schema id="CitiesDataComponent" targetNamespace="uri:AspNet:StarterKits:Classifieds:Data" xmlns:mstns="uri:AspNet:StarterKits:Classifieds:Data" xmlns="uri:AspNet:StarterKits:Classifieds:Data" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" attributeFormDefault="qualified" elementFormDefault="qualified">
    Line 3:  	<xs:annotation>


    Source File: /App_Code/DAL/Cities.xsd    Line: 1  

    I'm not sure how to fix this.  Help please.  Thanks.  I see in the forum advice to start my changes by adding a column in the classifieds_Ads database Tables.  I can't figure out where/how to do this either.  Thanks again.  Bev

     

    Saturday, May 10, 2008 9:01 PM

All replies

  • User1128022426 posted

    I would not recommend you editing the xsd file directly from the text unless you know exactly what you are doing. I would in order 

    1.Change the DB schema by adding that field there.

    2. Change the Stored Procs to reflect the DB schema changes, specially the GET method that builds the strong types dataset in the xsd file

    3.Rebuild the xsd datatable by going through the wizard of the TOP / FIRST Get Method on the datatable adapter, this will define the schema of the datatable.

    4.Change the code to pass the new added location field...

    good luck,

    Sunday, May 11, 2008 10:43 AM
  • User-557590556 posted

    Hi.  What I did so far was make a copy of the location.xsd file by saving as cities.xsd in VWD.  Then I changed every instance of location to cities. How/where do I add a field to the DB schema?  In fact, what is a DB schema?  I've been trying to follow directions in an earlier posting, but don't have the level of experience yet for this kind of change, also couldn't understand some posts as they were in french.  Thanks in advance for any help. 

    Sunday, May 11, 2008 11:44 AM