we are exploring the possibility of storing doc templates in the database, these are then retrieved in the form of a byte array and then to be used to create aspose documents
but at the minute we are having problems setting the aspose document to the byte array.
we do not want to create a word doc on disk and then set the aspose document = to the created document.
Can this be done?
just found what i needed
Dim dr As OracleDataReader = command.ExecuteReader()
dr.Read()
Dim b(dr.GetBytes(PictureCol, 0, Nothing, 0, Integer.MaxValue) - 1) As Byte
dr.GetBytes(PictureCol, 0, b, 0, b.Length)
dr.Close()
connection.Close() Dim streamIn As New System.IO.MemoryStream(b) Dim doc As New Aspose.Word.Document(streamIn)
Hello!
Thank you for asking this.
Your approach is right. To store documents as binary objects streams should be used. But note that it is not good to store many large files in a database. We had examples from customer practice which you can find in the forum: performance degradation, problems with replication etc. If you need thousands of such objects then some architectural optimization should be considered. Just be aware of this potential problem.
Regards,
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.