Solved

DTS / UNC / Scripting.FileSystemObject

Posted on 2002-04-09
10
929 Views
Last Modified: 2013-11-30
I am trying to access files using some vbscript in a DTS. However it fails by saying path not found on the
fso.getfolder(sFolder) line.


'**********************************************************************
'  Visual Basic ActiveX Script
'************************************************************************

Function Main()
     strFile = "\\unc_path\sharename"
          Set fso = CreateObject("Scripting.FileSystemObject")
     Set f = fso.GetFolder(sFolder)

etc..
0
Comment
Question by:gotaquestion
  • 6
  • 3
10 Comments
 
LVL 2

Expert Comment

by:JamesT
Comment Utility
Should you use strFile in the fso.GetFolder?

strFile = "\\unc_path\sharename"
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(strFile)
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
Comment Utility
I agree with JamesT (points to him)!

CHeers
0
 
LVL 1

Author Comment

by:gotaquestion
Comment Utility
that was a typo.
I had strfile in there.
but it still doesn't work.
0
 
LVL 2

Accepted Solution

by:
JamesT earned 100 total points
Comment Utility
I am sure this is obvious but make sure that the database can see that path and that permissions are not preventing access.
0
 
LVL 1

Author Comment

by:gotaquestion
Comment Utility
I think it is a permissions problem, I just found a kb article on it.

http://support.microsoft.com/support/kb/articles/q197/9/64.asp?LNG=ENG&SA=PER

0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 1

Author Comment

by:gotaquestion
Comment Utility
I can't figure it out.  I've got the sql user account, and the iusr account both duplicated on the remote machine but I still get "path not found."  I can log on to the sql server with the sql account and map the drive no problem and doesn't ask for username password so I know the share exist.

Is there another account the DTS manager is using to connect to the remote server that I'm overlooking?

I've tried both the IP address and the computer.

Also, they are all win2k servers but with no domain just assigned to the same workgroup


0
 
LVL 2

Expert Comment

by:JamesT
Comment Utility
This is from books online. It talks about debugging ActiveX scripts. If you have the required applications installed you can debug it and perhaps it will she some light.

Debugging ActiveX Scripts
If you have Microsoft® Windows® 2000, Microsoft Visual InterDev® 6.0 or the Microsoft Windows NT® 4.0 Option Pack installed, you can use the script debugger supplied with those products to troubleshoot your Microsoft ActiveX® scripts. Three types of events cause errors:

A forced break in the script execution.

Incorrect script syntax or object.

Objects that contain incorrect references.
Your ability to debug these errors depends on whether or not you have selected the Turn on just-in-time debugging check box.

How to select the Turn on just-in-time debugging option (Enterprise Manager)
To select the Turn on just-in-time debugging option

In the SQL Server Enterprise Manager console tree, right-click the Data Transformation Services node, and then click Properties.

Select the Turn on just-in-time debugging check box.

Important  If you select the Turn on just-in-time debugging check box, save your script or Data Transformation Services (DTS) package prior to running it or you will lose your changes. When you close the debugger window, the script and the launching application are also closed.
0
 
LVL 1

Author Comment

by:gotaquestion
Comment Utility
thanks for the help james,
it was the sqlserveragent service.  I didn't know that that had an account too. I just thought you needed to worry about the sql server account. so once I put the sqlserveragent account on the remote machine it worked fine.

0
 
LVL 1

Author Comment

by:gotaquestion
Comment Utility
thanks for the help james,
it was the sqlserveragent service.  I didn't know that that had an account too. I just thought you needed to worry about the sql server account. so once I put the sqlserveragent account on the remote machine it worked fine.

0
 
LVL 1

Author Comment

by:gotaquestion
Comment Utility
thanks for the help james,
it was the sqlserveragent service.  I didn't know that that had an account too. I just thought you needed to worry about the sql server account. so once I put the sqlserveragent account on the remote machine it worked fine.

0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Viewers will learn how the fundamental information of how to create a table.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

771 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