I hope someone can help me with the following problem in translating VO behaviour into XSharp.
In our old VO app we use a text editing component TXControl as an ActiveX. We use it to create documents in .DOC format, then save these documents into a memo field in our database.
To save the documents we do the following - the TXControl has a SaveToMemory method which returns a byte array, and we convert that to a string and save it to the database memo field.
Code: Select all
LOCAL cValue AS STRING
__OLEClientByteArrayAsString(BAS_ONCE)
cValue:=oTXControl:SaveToMemory(9,FALSE)
oServer:FieldPut(#DOCDATA, cValue)
Code: Select all
LOCAL uValue AS USUAL
uValue:=oServer:FieldGet(#DOCDATA)
Code: Select all
oTXControl:LoadFromMemory(CreateInstance(#OleBinary,uValue),9,FALSE)
So the question is, what would be the equivalent to CreateInstance(#OleBinary,uValue) to convert the Usual value returned from FieldGet to a byte[] that I can then save to the SQL Server database?
Thanks
Nick