1. Shaila Panwar
  2. PowerBuilder
  3. Monday, 1 April 2019 23:45 PM UTC

Hi All,

 

I am trying to write file in PB.

This is code I am using when I open the file.

li_ascii_file_num = FileOpen(is_sds_ascii_file, LineMode!, Write!, LockWrite!, Replace!)

 

I write the file and read the file within the code this works file.

When I close the file and open this file outside the PB it is blank I could not find anything in that .txt file.

Can you please help me out how I can see the content of the file if I open it outside PB.

Thanks,
Shaila

 

 

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 3 April 2019 19:56 PM UTC
  2. PowerBuilder
  3. # 1

Hi Shaila;

  What version and build of PB are you using?

regards ... Chris

Comment
There are no comments made yet.
Chris Keating Accepted Answer Pending Moderation
  1. Tuesday, 2 April 2019 01:49 AM UTC
  2. PowerBuilder
  3. # 2

If the file is opened in stream mode, no conversion is done. If the file was opened in text mode, FileWrite returns -1. Use FileWriteEx to write to files in text mode.

Comment
  1. Sivaprakash BKR
  2. Wednesday, 3 April 2019 12:50 PM UTC
ll_jobno = FileOpen(ls_filename, StreamMode!, Write!, LockWrite!, Replace!)



ls_str = 'Bill No.:' + String(ll_bilno)

FileWrite(ll_jobno, ls_str + ls_next_line)



FileClose(ll_jobno)



Works fine for me !

  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.