SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
File Replace

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
File Replace
Author Message
David



Joined: 16 Oct 2003
Posts: 9

Post File Replace Reply with quote

I'm using a global variable to set the connection string for an oracle application login. The Idea is to use one place to change the value instead of trying to change the value in multiple places. I thought that I could use the File Replace command to replace the values in the connection string. Below is the code that I am using

DIM FOUND number

FileReplaceEx("D:\My Documents\Tech Appraisal Extracts\","Inventory Extracta.bat","X1X2/X3",global.newconnection,false, found)

When the job runs, I get an error message but no details and when I look at the file the file has not been changed. I noticed that when I run the job in debug mode it seems to work..

Any suggestions?

Thu Apr 07, 2005 1:15 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7974

Post Re: File Replace Reply with quote

FileReplaceEx("D:\\My Documents\\Tech Appraisal Extracts","Inventory
Extracta.bat","X1X2/X3",global.newconnection,false, found)

: I'm using a global variable to set the connection string for an oracle
: application login. The Idea is to use one place to change the value
: instead of trying to change the value in multiple places. I thought that I
: could use the File Replace command to replace the values in the connection
: string. Below is the code that I am using

: DIM FOUND number

: FileReplaceEx("D:\My Documents\Tech Appraisal
: Extracts\","Inventory
: Extracta.bat","X1X2/X3",global.newconnection,false, found)

: When the job runs, I get an error message but no details and when I look at
: the file the file has not been changed. I noticed that when I run the job
: in debug mode it seems to work..

: Any suggestions?

Thu Apr 07, 2005 1:38 pm View user's profile Send private message
David



Joined: 16 Oct 2003
Posts: 9

Post Re: File Replace Reply with quote

: FileReplaceEx("D:\\My Documents\\Tech Appraisal
: Extracts","Inventory
: Extracta.bat","X1X2/X3",global.newconnection,false, found)

Still have the same issue. Doesn't work when clicking on Run now,but will work when debugging the script.

Fri Apr 08, 2005 1:53 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7974

Post Re: File Replace Reply with quote

Make sure you don't run this job detached, becasue in the current version detached jobs have no access to the global variables memory.

: Still have the same issue. Doesn't work when clicking on Run now,but will
: work when debugging the script.

Fri Apr 08, 2005 2:08 pm View user's profile Send private message
David



Joined: 16 Oct 2003
Posts: 9

Post Re: File Replace Reply with quote

: Make sure you don't run this job detached, becasue in the current version
: detached jobs have no access to the global variables memory.
Still having the same problems. I have taken off the check mark for detached job.

Fri Apr 08, 2005 2:52 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7974

Post Re: File Replace Reply with quote

Add a message box for the global variable to see the value when the script runs.
I still think the problem is in the file name or path. Please make sre it is correct and the D: drive is accessible to the account running the scheduler. Also try specifying "*.bat" for the file name. Also note that the search is case-sensitive.

: Still having the same problems. I have taken off the check mark for detached
: job.

Fri Apr 08, 2005 3:40 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.