I am trying to save (and load) a reasonably long string to a Cache Class String(MAXLEN=1024000) Property.
The string is around 32,000 characters long and instead of storing the string contents (which is a JSON object for what it's worth) it stores
2@%Stream.GlobalCharacter
When I try to load the string content in my C# program I literally get the string above, I do not get the JSON. When viewing the table via the Cache web and terminal interfaces I see the above string as well.
I have another JSON string which is around 23,000 characters long and that saves and loads without issue.
I understand that 2@%Stream.GlobalCharacter is a way of storing data, but I would like to easily be able to load/save it as a string.
Update
I am attempting to save the data in my C# ASP.Net App as follows
sql = "INSERT INTO Namespace.Table ( Name, Active, Revision, Definition ) VALUES ( ?, 1, ?, ? )";
cC = new CacheCommand(sql, dbConn);
cC.Parameters.Add(new CacheParameter("name", formType)); // string
cC.Parameters.Add(new CacheParameter("revision", revision)); // int
cC.Parameters.Add(new CacheParameter("definition", formData)); // string
cC.ExecuteNonQuery();
I am loading the data as follows
string sql = "SELECT TOP 1 * FROM Namespace.Table WHERE Active = 1 AND Name = ? ORDER BY Revision DESC";
CacheCommand cC = new CacheCommand(sql, dbConn);
cC.Parameters.Add(new CacheParameter("name",formType));
CacheDataReader rdr = cC.ExecuteReader();
while(rdr.Read())
{
string json = rdr["Definition"].ToString();
}
