Free Support Forum -

Auto save to db?

Not sure if this is the right place to ask but I would like to save the auto-rendered word doc to a database as a BLOB once it’s produced. How will I be able to do this?

You need to use Document.Save to save into a memory stream, then obtain byte array from that memory stream and store the byte array in the blob field.

I searched the web using the method you described but it always results in using ASP.NET. Can I do the same thing in Classic ASP? I seem to have trouble finding info on classic asp and memory streams.

ah… I may have stumbled upon something similar. By using the Classic ASP dictionary object and the rs.AppendChunk method will it accomplish the same thing? Any classic ASP experts here?

nevermind… I think I’ll just use aspx for this step since it’s possible to combine classic ASP and ASP.NET together to achieve similar results. Anyone have sample code to do this then? I would really appreciate it to use it as a reference!

I’m fickle-minded… if I save to stream, is this actually an ADO stream that I can use in classic ASP? If not I couldn always resort to saving a temp file and writing BLOB data to db through the File Object.