I need to be able to update a binary table and i do it like so:
View v = session.Database.OpenView("SELECT `Data` FROM `Binary` WHERE `Name` = '{0}'", binaryKeyName);
v.Execute();
var IsReadOnly = session.Database.IsReadOnly;
Record r = v.Fetch();
StreamReader reader = new StreamReader(r.GetStream("Data"));
string text = reader.ReadToEnd();
text = text.Replace(@"Test12345", "TTTest");
byte[] byteArray = Encoding.ASCII.GetBytes(text);
MemoryStream stream = new MemoryStream(byteArray);
Once I have the stream I would like to update database table. How do i do it?
Thanks