Link to home
Start Free TrialLog in
Avatar of rranjan7
rranjan7

asked on

Reading text file from SQL Jobs

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:
-----
Dim MyCOM
 set MyCOM= CreateObject("ObjectName.ClassName")
MyCOM.loadIE  "PageName","ServerName"
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.

ASKER CERTIFIED SOLUTION
Avatar of rranjan7
rranjan7

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial