Question:
How can I import data into a datawindow if the data blob contains CR/LF as part of its data?
I am using dw.object.data and dw.importstring for distributed data transfer. This problem is arising when a user enters data (such as in a note) that contains a new line character in it.
I’ve tried parsing the string and scanning for CR/LFs and enclosing them in quotes, but this processing is very slow and adds considerably to the transfer times this is performed on as part of a general data transfer mechanism.
Answer:
Unfortunately, the only way to do this is how you described: using quotes around strings. The way I normally do this is to perform the export myself using a function to extract the data from the datawindow and enclose all strings in quotes.
If you are a pure PowerBuilder shop, then you can also use the Get/Set full state of the datawindow to do distributed data transfer.