我需要能够更新二进制表,我这样做:
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);
一旦我有了流,我想更新数据库表。我该怎么做?
谢谢