JefB
Programmer
- Dec 29, 2000
- 56
I have a DTS set up that exports a SQL table to an Excel file.
By itself it works fine, however I am trying to use a Global Variable to change the name of the '.xls' table.
This is my code (in a stored procedure):
exec master..xp_cmdshell 'DTSRUN /S ServName /E /N ENN_Var_DTS /A DstTbl:8 = \\ServName\XFER\Test2.xls"'
The Error Msg I get (via Query Analyzer) is:
...
DTSRun OnError: DTSStep_DTSDataPumpTask_1, Error = -2147467259 (80004005)
...
Error: -2147467259 (80004005); Provider Error: -534774783 (E01FFC01)
Error string: 'C:\Program Files\Common Files\System\Mapi\1033\NT\ \ServName\XFER\Test2.xls"' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.
Error source: Microsoft JET Database Engine
Help file:
Help context: 5003044
The DstTbl is set on the DTSRun "Microsoft Excel 97-2000" connection DataSource Property Name. I have also tried pointing the variable to Property Name objects in the Task and Step areas, with no success.
Am I placing the variable in the correct place or am I missing something?
JefB
By itself it works fine, however I am trying to use a Global Variable to change the name of the '.xls' table.
This is my code (in a stored procedure):
exec master..xp_cmdshell 'DTSRUN /S ServName /E /N ENN_Var_DTS /A DstTbl:8 = \\ServName\XFER\Test2.xls"'
The Error Msg I get (via Query Analyzer) is:
...
DTSRun OnError: DTSStep_DTSDataPumpTask_1, Error = -2147467259 (80004005)
...
Error: -2147467259 (80004005); Provider Error: -534774783 (E01FFC01)
Error string: 'C:\Program Files\Common Files\System\Mapi\1033\NT\ \ServName\XFER\Test2.xls"' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.
Error source: Microsoft JET Database Engine
Help file:
Help context: 5003044
The DstTbl is set on the DTSRun "Microsoft Excel 97-2000" connection DataSource Property Name. I have also tried pointing the variable to Property Name objects in the Task and Step areas, with no success.
Am I placing the variable in the correct place or am I missing something?
JefB