Reading text file from SQL Jobs
Posted on 2008-06-20
I have a job running on SQL Server 2000 under SQL Server Agent. This job calls a component which in turn opens Internet Explorer and load a page by calling a method on the object. The code inside the job is:
set MyCOM= CreateObject("ObjectName.ClassName")
set MyCOM= nothing
The COM method accepts server name and the page name as its parameters. Currently I type in the sever name in the job. I need to make this server name dynamic. So I am planning to read this server name from a text file which I can store in a directory on the sever.
Can I use file system object to ready the server name from a text file and them pass it as a parameter to this COM method? If yes, how can I do that?
Any other idea to achieve my goal will also be appreciated.