Solved

Reading text file from SQL Jobs

Posted on 2008-06-20
1
540 Views
Last Modified: 2013-12-07
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.

0
Comment
Question by:rranjan7
1 Comment
 

Accepted Solution

by:
rranjan7 earned 0 total points
Comment Utility
Never mind. I was able to figure this out by myself.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now