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

Pergunta

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?

Foi útil?

Solução

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

Outras dicas

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top