1

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?

Mohamed Kamal
  • 2,377
  • 5
  • 32
  • 47

3 Answers3

3

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

Alex7575
  • 65
  • 2
2
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();
Sebastiaan
  • 432
  • 1
  • 4
  • 22
0

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

Nirmal
  • 1,223
  • 18
  • 32