constructor to deserialize an object not found
-
Ok, I have inhertied a some code in which I find that the previous developer has done something I do not agree with but..I have to work with what I have got. There is a typed dataset called QueryDataSet and there is an object called QueryDataObject that inherits from QueryDataSet. In the development enviorment all is well mbut when I get to my executable, I get the following error: "The constructor to deseralize an object of type WTI.Fortis.QueryDataObject was not found". I am thinking that the previous developer was changing the constructor protected QueryDataSet(SerializationInfo info, StreamingContext context) { that is genereated as a result of me autogenerating the dataset to public. Any thoughts on this matter would be greatly appreciated. Sameer
-
Ok, I have inhertied a some code in which I find that the previous developer has done something I do not agree with but..I have to work with what I have got. There is a typed dataset called QueryDataSet and there is an object called QueryDataObject that inherits from QueryDataSet. In the development enviorment all is well mbut when I get to my executable, I get the following error: "The constructor to deseralize an object of type WTI.Fortis.QueryDataObject was not found". I am thinking that the previous developer was changing the constructor protected QueryDataSet(SerializationInfo info, StreamingContext context) { that is genereated as a result of me autogenerating the dataset to public. Any thoughts on this matter would be greatly appreciated. Sameer
QueryDataObject must implement ISerializable as well as QueryDataSet (I think). You might be able to get around it by casting QueryDataObject to a QueryDataSet and Deserializing that instead. I havn't used Serialization that much but I do remember coming across something along the previous lines.
You know you're a Land Rover owner when the best route from point A to point B is through the mud. Ed
-
QueryDataObject must implement ISerializable as well as QueryDataSet (I think). You might be able to get around it by casting QueryDataObject to a QueryDataSet and Deserializing that instead. I havn't used Serialization that much but I do remember coming across something along the previous lines.
You know you're a Land Rover owner when the best route from point A to point B is through the mud. Ed
Well the QueryDataset is a type dataset and that does not implement te ISeralizable interface by default and I am pretty positive that casting QueryDataObject to a QueryDataSet maynot by me much, but I am going to try to implement the Iseralizable interface on the QueryDataObject and see what happens.
-
Well the QueryDataset is a type dataset and that does not implement te ISeralizable interface by default and I am pretty positive that casting QueryDataObject to a QueryDataSet maynot by me much, but I am going to try to implement the Iseralizable interface on the QueryDataObject and see what happens.