开发者

Is there a way to store blobs / rich text memos as rtf programmatically on server hard disc instead of the database?

Code Experts !

is there a way to store blobs / rich text memos as rtf programmatically on server hard disc instead of the database ?

Update (1)

i want to write in a memo field and store it using identifiers like sessions and time stamps for example writing a memo with the session "subject" and session "dateANDtime" to be stored as "mysubject-12/12/2010-11:56pm.rtf"

i need of course a suggestion how to retrieve the file. can i build开发者_StackOverflow中文版 hyperlink programmatically?


If you're on SQL 2008, do a search for FILESTREAM. That should solve your problem.


Object obj = // your object
XmlSerializer serializer = new XmlSerializer(this.GetType());
TextWriter textWriter = new StreamWriter(context.Server.MapPath("~/App_Data/Name.xml"));
serializer.Serialize(textWriter, this);
textWriter.Close();


Store them in files and write those files to the drives using MapPath function.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜