Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 DTSRUN : can't find filename

Author  Topic 

Gingis
Starting Member

6 Posts

Posted - 2002-03-17 : 10:25:55
Hello,

I have a DTS package which copy a csv file content to a table.
The DTS package have 1 global variables : Filename (original value : csv.csv).
I use the following activeX script to custom datapump :
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Function Main()

Set oConn = DTSGlobalVariables.Parent.Connections("Text File (Source)")

oConn.DataSource = "\\netforce\dts\"&DTSGlobalVariables("Filename").value
Main = DTSTaskExecResult_Success
End Function
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Simple isn't it ?

To launch my dts, I use the following line :
exec master.dbo.xp_cmdshell 'dtsrun /S netforce /N mydts /U sa /P xxx'

It works perfectly.

Now, I want to pass the parameter filename in the command line which now looks like that :
exec master.dbo.xp_cmdshell 'dtsrun /S netforce /N mydts /U sa /P xxx /A Filename:String=csv2.csv'

And I always have the following problem :
Error string: Error opening datafile: The filename, directory name, or volume label syntax is incorrect.

Of course, the file exists in \\netfoce\dts\ shared folder.

Maybe there is a permission problem, which would be amazing because SQLSERVER and SQLSERVERAGENT log on as an administrator account.


Thanks for your help,

Gingis

   

- Advertisement -