I have used RTF controls for storing document and images in SQL Server but it does not work after converting to PostgreSQL 10. I am just planning to use the below way. Please let me know If I will hit dead end again.
1. Increase the Buffer Size of RTF Control through Properties Window. The maximum that we need it.
2. Use the Binary Variable in TD and Binary data type in PostgreSQL
3. Use SalStringToBinary() and SalBinaryToString() with UTF8 since SalRTFTextCopy() or SalRTFTextPaste() will support only String Variable and hence conversion should be done between RTF control and database.
4. Last but not least. Set the maximum DB buffer size under ODBC in Sql.ini or Set through DBP_LONGBUFFER in SqlSetParamterAll()
5. SalGetBufferLength() to be used if at all, if we want to check for the document or image size for calculating size of the object.
This is working fine for me even for 1000KB RTF document with all images, Tables inside the RTF
FYI - I was using Wide Character and Multi-Byte and also SqlSetLongBindDataType() for converting Long String to Binary data type while storing in database but I have removed this all concept as the above new logic works fine.
Who is online
Users browsing this forum: [Ccbot] and 0 guests