devxlogo

Importing Data Containing a CR/LF

Importing Data Containing a CR/LF

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.

See also  Monetize TikTok For Your Business
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist