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
 Import/Export (DTS) and Replication (2000)
 Dynamically setting properties in DTS

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-04-09 : 09:31:26
Scott writes "I am storing a dts package as a file for use across multiple servers eg dev, test, prod. My package is to import a source file (fixed width) and load the contents into a table.
I want to set all of the necessary properties such as server, catalog, source file etc on the fly before executing the package.

I am using a DTSDataPumpTask that has a DestinationObjectName (table name) and a SourceObjectName (source file UNC path).

When try to get the contents of DestinationObjectName:
(portion of a store procedure)
DECLARE @prop varchar(255)
EXEC @hr = sp_OAGetProperty @oPKG, 'Tasks("DTSTask_DTSDataPumpTask_1").DestinationObjectName', @prop OUT
IF @hr <> 0
BEGIN
EXEC sp_OAGetErrorInfo @oPKG
RETURN
END

I get an error:

HRESULT: 0x80020006@hr= 0 Source: ODSOLE Extended Procedure Description: Unknown name.

Why am I able to get the name and the description of the pump task but not the DestinationObjectName or the SourceObjectName whether it be getting or setting ?

Thanks in advance."

setbasedisthetruepath
Used SQL Salesman

992 Posts

Posted - 2002-04-09 : 09:47:47
If you're using DTS w/ SQL 2K you've taken the long way round - you can pass the global variable straight into the stored procedure.

setBasedIsTheTruepath
<O>
Go to Top of Page
   

- Advertisement -