Refreshing a referenced dataset

D

David D. McCrory

I have a typed dataset that was created from a referenced dataset. I have
made changes to the XSD file and want to propegate the changes to my typed
dataset. I have tried deleting the typed dataset and then adding it back,
but it still has the old structure. Can someone help me with this?
 
M

Miha Markic [MVP C#]

Hi David,

Did you try right click on xsd file in solution explorer and select Run
Custom Tool?
Also, the changes are propagated when you save xsd file.
If this isn't working, check what is the Custom Tool for the selected xsd
file - it should be MSDataSetGenerator.
 
D

David D. McCrory

I tried running the Custom Tool for the XSD file, which is
MSDataSetGenerator, and did not get any results...the Build Action property
is set to Content. Should it be set to something else??


Miha Markic said:
Hi David,

Did you try right click on xsd file in solution explorer and select Run
Custom Tool?
Also, the changes are propagated when you save xsd file.
If this isn't working, check what is the Custom Tool for the selected xsd
file - it should be MSDataSetGenerator.

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

David D. McCrory said:
I have a typed dataset that was created from a referenced dataset. I have
made changes to the XSD file and want to propegate the changes to my typed
dataset. I have tried deleting the typed dataset and then adding it back,
but it still has the old structure. Can someone help me with this?
 
M

Miha Markic [MVP C#]

Hi David,

Set "Show All files" in solution explorer (icon in solution explorer's
toolbar) so you'll be able to see the code produced.
XSD leaf in solution explorer should turn into a node. Under this node
should be a file with same name and extension cs (if project is c#).
Check its content.
Just for test, you might delete its content (not the file itself) and run
custom tool again to see if it produces anything.

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

David D. McCrory said:
I tried running the Custom Tool for the XSD file, which is
MSDataSetGenerator, and did not get any results...the Build Action property
is set to Content. Should it be set to something else??


Miha Markic said:
Hi David,

Did you try right click on xsd file in solution explorer and select Run
Custom Tool?
Also, the changes are propagated when you save xsd file.
If this isn't working, check what is the Custom Tool for the selected xsd
file - it should be MSDataSetGenerator.

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

David D. McCrory said:
I have a typed dataset that was created from a referenced dataset. I have
made changes to the XSD file and want to propegate the changes to my typed
dataset. I have tried deleting the typed dataset and then adding it back,
but it still has the old structure. Can someone help me with this?
 
D

David D. McCrory

Everything looks ok in the *.cs file....the "GetUserLogin" table that is
shown below, from the dsUserData.cs file, is the one that is not showing up
in the referenced DataSet....Even if I delete the DataSet and re-create
it...the table below is not a part of the DataSet....could it be cached
somewhere else??

protected dsUserData(SerializationInfo info, StreamingContext context) {
string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string))));
if ((strSchema != null)) {
DataSet ds = new DataSet();
ds.ReadXmlSchema(new XmlTextReader(new System.IO.StringReader(strSchema)));
if ((ds.Tables["GetUserAddress"] != null)) {
this.Tables.Add(new GetUserAddressDataTable(ds.Tables["GetUserAddress"]));
}
if ((ds.Tables["GetUserInfo"] != null)) {
this.Tables.Add(new GetUserInfoDataTable(ds.Tables["GetUserInfo"]));
}
if ((ds.Tables["GetUserLogin"] != null))
{
<----------------This table is not in the referenced DataSet.
this.Tables.Add(new GetUserLoginDataTable(ds.Tables["GetUserLogin"]));
}




Miha Markic said:
Hi David,

Set "Show All files" in solution explorer (icon in solution explorer's
toolbar) so you'll be able to see the code produced.
XSD leaf in solution explorer should turn into a node. Under this node
should be a file with same name and extension cs (if project is c#).
Check its content.
Just for test, you might delete its content (not the file itself) and run
custom tool again to see if it produces anything.

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

David D. McCrory said:
I tried running the Custom Tool for the XSD file, which is
MSDataSetGenerator, and did not get any results...the Build Action property
is set to Content. Should it be set to something else??


Miha Markic said:
Hi David,

Did you try right click on xsd file in solution explorer and select Run
Custom Tool?
Also, the changes are propagated when you save xsd file.
If this isn't working, check what is the Custom Tool for the selected xsd
file - it should be MSDataSetGenerator.

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

I have a typed dataset that was created from a referenced dataset. I have
made changes to the XSD file and want to propegate the changes to my typed
dataset. I have tried deleting the typed dataset and then adding it back,
but it still has the old structure. Can someone help me with this?
 
D

David D. McCrory

Thanks for the help Miha....

I finally got this resolved. I had to delete and re-install my references to
the projects that contained the XSD. I don't know if this is what should
happen or if the references should update automatically. I tried rebuilding
the solution several times and it never worked until I deleted and
re-installed the references.

Any light on this subject would be appreciated. I know how to correct the
issue, but I don't understand why...


Miha Markic said:
Hi David,

Set "Show All files" in solution explorer (icon in solution explorer's
toolbar) so you'll be able to see the code produced.
XSD leaf in solution explorer should turn into a node. Under this node
should be a file with same name and extension cs (if project is c#).
Check its content.
Just for test, you might delete its content (not the file itself) and run
custom tool again to see if it produces anything.

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

David D. McCrory said:
I tried running the Custom Tool for the XSD file, which is
MSDataSetGenerator, and did not get any results...the Build Action property
is set to Content. Should it be set to something else??


Miha Markic said:
Hi David,

Did you try right click on xsd file in solution explorer and select Run
Custom Tool?
Also, the changes are propagated when you save xsd file.
If this isn't working, check what is the Custom Tool for the selected xsd
file - it should be MSDataSetGenerator.

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

I have a typed dataset that was created from a referenced dataset. I have
made changes to the XSD file and want to propegate the changes to my typed
dataset. I have tried deleting the typed dataset and then adding it back,
but it still has the old structure. Can someone help me with this?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top