Link to home
Start Free TrialLog in
Avatar of gotaquestion
gotaquestion

asked on

DTS / UNC / Scripting.FileSystemObject

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..
Avatar of JamesT
JamesT

Should you use strFile in the fso.GetFolder?

strFile = "\\unc_path\sharename"
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(strFile)
Avatar of Guy Hengel [angelIII / a3]
I agree with JamesT (points to him)!

CHeers
Avatar of gotaquestion

ASKER

that was a typo.
I had strfile in there.
but it still doesn't work.
ASKER CERTIFIED SOLUTION
Avatar of JamesT
JamesT

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
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

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


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.
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.

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.

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.