Select with a Where that looks up in a XML column... Possible?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi,
We have a serie of objects stored in the database as xml (ex: MyClass is
stored in the table MyClasses in the field XML_MyClassObj which contains the
an instance of the class serialized to XML). We did that because it was
easier to serialize everything and send it as XML than to build a 25-30
table structure that would become unmanageable.

Unfortunately, a problem arose today. This object uses some other object in
which we must add a method that would break the first object (the one that
is stored in the DB). The question is : Is it possible to do a Select that
would look in the XML_MyClassObj field and tell me if there is an object (of
the second type) with the ID equal to some determined ID we have?

Let's say

MyType1 --instance--> MyObject1--> Uses Obj2Child(MyObject2)-->ID=2;
MyType2 --instance--> MyObject2--> ID=2;

I take the MyObject2 and delete it. MyObject1 then become invalid, but how
can I retrieve that MyObject1 is using MyObject2? Let's remember that
MyObject1 is serialized in XML and is stored in a field in a table.

Is it possible? if so, how?

Thanks

ThunderMusic


.



Relevant Pages

  • Re: Serialization Question
    ... Note that this option can get tricky, as you are going to return an XML string from the web service method, which may not work for them. ... Create another object that has the clients format and transfer the information from your object to that object when the web routine that this client uses is hit. ... The only reason I can see is you are trying to serialize this information and present it, via some sort of service boundary, as XML, not as a serialized object. ... I would take the XML through a transformation to get the format you desire rather than attempt to have the object serialize differently. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Regarding performance on objects serialized to Xml - thoughts and code presented
    ... instance and add the XML to that. ... > StringWriter sW = new StringWriter; ... > XmlTextWriter XmlW = Xml.XmlTextWriter;> ... > // Serialize PlaceHolders ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Serialization Question
    ... files to a partner organisation and they are expecting an XML file of the ... The only reason I can see is you are trying to serialize this information ... If I had Address as Array(of String) then all parts of address would have ... How could I change things so the the XML file produced is of this format: ...
    (microsoft.public.dotnet.languages.vb)
  • Re: DataSet and best practice in 2.0
    ... from webservices to remoting no? ... which changes the whole game for distributed apps. ... Collections serialize to XML as well so there's not that much ...
    (microsoft.public.dotnet.framework.performance)
  • Re: DataSet and best practice in 2.0
    ... dataset to a byte, which has about 35,000 elements in the array. ... The suggestion was to use Base64 encoding, not xml, to serialize the ... as far as switching to binary serialization, ...
    (microsoft.public.dotnet.framework.performance)