Hi,
I've been working on an important medical research application which required Saved Query functionality. To implement this, we serialized the the relation predicate bucket that formed the query, and stored the serialized object in the database.
BinaryFormatter f = new BinaryFormatter();
f.AssemblyFormat = FormatterAssemblyStyle.Simple;
MemoryStream ms = new MemoryStream();
f.Serialize(ms, bucket);
string text = Convert.ToBase64String(ms.ToArray());
We can then deserialize the object at will to re-run the saved query.
BinaryFormatter f = new BinaryFormatter();
f.AssemblyFormat = FormatterAssemblyStyle.Simple;
byte[] filterBytes = Convert.FromBase64String(predicateString);
MemoryStream ms = new MemoryStream(filterBytes);
object obj = f.Deserialize(ms);
RelationPredicateBucket bucket = (RelationPredicateBucket)obj;
This was working perfectly until we had to upgrade to LLBL 2.6 (varchar(max) field was causing problems with grid paging). LLBL 2.5 objects in an LLBL 2.6 environment do not go down well. Our design flaw is starting to bite!
We are resigned to upgrading all our llbl 2.5 serialized objects to llbl 2.6. Has anyone done this before? Is this the best solution for this scenario?
I would appreciate it if someone helps us on this.
Thanks.