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

StackOverflow https://stackoverflow.com/questions/4692575

Question

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 hyperlink programmatically?

Was it helpful?

Solution

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

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top