1. John Vanleeuwe
  2. PowerBuilder
  3. Thursday, 18 May 2023 12:46 PM UTC

 Hi guys,

just wondering if Appeon one day would/could create an enhancement for the dw/ds Importstring function. Files at the moment have to be tab or comma delimited to be able to be imported...

A nice enhancement would be to be able to use importstring with a fixed length file, where each column/ record has the same length.

Then we could create an external datawindow and based on the length of the external dw columns , the import can be done with a single line of code...

 

P.S. We are currently reading line per line , but i would love to see above solution provided by Appeon.

If this is not the right place to post , please do let me know where else i can ask this question please :)

 

 tia
John
mike S Accepted Answer Pending Moderation
  1. Thursday, 18 May 2023 14:29 PM UTC
  2. PowerBuilder
  3. # 1

send enhancement requests to appeon via the 'report a bug' link.

"each column/ record has the same length." I've never seen this in an imported file.  But if you have the luxury of defining the file spec, then sure.  

it makes more sense to read the field names and size from the datawindow definition being imported into, and in that case it can only be used with string fields.   That is very doable.  and it is super easy to build this yourself in powerbuilder.

 

 

 

Comment
  1. John Vanleeuwe
  2. Thursday, 18 May 2023 14:59 PM UTC
I made a mistake , i meant to write , each column has a fixed length ( not same length) and each record has the same length. I will send it to Appeon through the "report a bug" link.



i want to import it in a datawindow , then add some unique key values , and save it directly in the database, without having to process each single line...





Thanks.
  1. Helpful
  1. mike S
  2. Thursday, 18 May 2023 15:28 PM UTC
it is easy to write this code yourself. build an nvo that takes the datawindow/store as an argument and the file, and process it in.
  1. Helpful
  1. John Vanleeuwe
  2. Tuesday, 23 May 2023 07:31 AM UTC
But ... how to load the data into my ds/dw ? If pb doesn't allow the importfile for non-tab separated / non semicolumn separated files ? as stated before , i want to avoid line per line processing... What am i missing here ?



  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.