Solved

DTS / UNC / Scripting.FileSystemObject

Posted on 2002-04-09
10
933 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
ID: 6929687
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]
ID: 6930554
I agree with JamesT (points to him)!

CHeers
0
 
LVL 1

Author Comment

by:gotaquestion
ID: 6931573
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
ID: 6931596
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
ID: 6931632
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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 1

Author Comment

by:gotaquestion
ID: 6931708
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
ID: 6931742
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
ID: 6931778
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
ID: 6931787
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
ID: 6931853
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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
IIS Server infected with Ransomware - Postmortem investigation 12 128
ASP.NET 5 Templates 2 65
SQL Server Question 5 25
Help Extract Specific in SQL 8 15
I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

939 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

4 Experts available now in Live!

Get 1:1 Help Now