Home All Groups Group Topic Archive Search About
Author
24 Nov 2005 3:34 PM
Microsoft
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

Author
27 Nov 2005 6:16 PM
Martin
What would you expect the current directory to be when running it from
enterprise manager?


Show quote
"Microsoft" <dzo***@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
>
>

AddThis Social Bookmark Button