Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Wise 9.02: Updating Text file not working

Status
Not open for further replies.

Mrbaseball34

Programmer
Apr 17, 2002
24
0
0
US
Got this script:
Code:
item: Set Variable
  Variable=INAPPDIR
  Value='c:\temp'
end
item: Read/Update Text File
  Variable=LINE
  Pathname=c:\DBUpdate0008.sql
  Flags=00000001
end
item: Set Variable
  Variable=LINE
  Value=Ucase$(LINE)
  Flags=00100000
end
item: If/While Statement
  Value=InStr(LINE, ":INAPPDIR" )
  Flags=00001101
end
item: Parse String
  Source=%LINE%
  Pattern=:InAppDir
  Variable1=LEFT
  Variable2=RIGHT
  Flags=00000010
end
item: Set Variable
  Variable=LINE
  Value=%LEFT% %INAPPDIR% %RIGHT%
end
item: End Block
end
item: End Block
end
item: Display ReadMe File
  Pathname=c:\DBUpdate0008.sql
  Title=g
end
and it is supposed to modify this SQL file (DBUpdate0008.sql):
Code:
UPDATE SYMSPROCESS 
SET Command = :INAppDir + '\Bin\SendOrder.exe' 
WHERE Process_Key = 700 

UPDATE SYMSPROCESS 
SET Command = :INAppDir + '\Bin\PriceManager.exe' 
WHERE Process_Key = 800 

UPDATE SYMSPROCESS 
SET Command = :INAppDir + '\Bin\DTSWImport.exe' 
WHERE Process_Key = 900
However, the lines are not changed when I display the file after the loop.
Stepping through, I see that the value of %LINE% is getting set correctly.

What am I doing wrong?
 
Make sure you have "Make Backup File" checked in order to actually change the file.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top