integer li_FileNum, li_FileNum_Write
string ls_Emp_Input, ls_output
long ll_FLength
long ll_count
ll_count = 1
ll_FLength = FileLength64("C:\countries.txt")
li_FileNum = FileOpen("C:\countries.txt", LineMode!)
li_FileNum_Write = FileOpen("C:\country2.TXT", LineMode!, Write!, LockWrite!, Append!)
IF ll_FLength < 32767 THEN
do while FileRead(li_FileNum, ls_Emp_Input) > 0
ls_output = 'dw_1.Setvalue("country", ' + string(ll_count) + ', "' + trim(ls_emp_input) +'")'
FileWrite(li_FileNum_Write, ls_output)
ll_count = ll_count +1
loop
END IF
Over the years of being a applications developer ( Delphi, Powerbuilder, VB, Agile Outsystems..etc). I have learned many things and I may need to refer to them in the future. Some of the tips may not be relevant with the later versions of the software. I am still in the process of transferring all my notes.
Friday, April 27, 2012
Reading/Writing To Text Files
Labels:
Powerbuilder
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment