I'm running a job from a schedule which runs a .vbs script
In this script I have the following script to include another file
Function GetFileContents(sFileName)
Dim FSO, ScriptFile
Set FSO = CreateObject("Scripting.FileSystemObject")
Set ScriptFile = FSO.OpenTextFile(sFilename,1)
GetFileContents = ScriptFile.ReadAll
Set ScriptFile = Nothing
Set FSO = Nothing
End Function
-> ExecuteGlobal GetFileContents("db_conn.vbs")
When I run the job from sql enterprise manager it stops at the row above
If I run the script from the command line, all is good
What's the problem
Thanks
DenisWhat would you expect the current directory to be when running it from
enterprise manager?
"Microsoft" <dzoddi@.mvmnet.com> wrote in message
news:OjDx0yQ8FHA.1032@.TK2MSFTNGP11.phx.gbl...
> I'm running a job from a schedule which runs a .vbs script
> In this script I have the following script to include another file
> Function GetFileContents(sFileName)
> Dim FSO, ScriptFile
> Set FSO = CreateObject("Scripting.FileSystemObject")
> Set ScriptFile = FSO.OpenTextFile(sFilename,1)
> GetFileContents = ScriptFile.ReadAll
> Set ScriptFile = Nothing
> Set FSO = Nothing
> End Function
> -> ExecuteGlobal GetFileContents("db_conn.vbs")
>
> When I run the job from sql enterprise manager it stops at the row above
> If I run the script from the command line, all is good
> What's the problem
> Thanks
> Denis
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment