×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Wise 9.02: Updating Text file not working

Wise 9.02: Updating Text file not working

Wise 9.02: Updating Text file not working

(OP)
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?
Replies continue below

Recommended for you

RE: Wise 9.02: Updating Text file not working

(OP)
Make sure you have "Make Backup File" checked in order to actually change the file.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close