Home > Archive > MS SQL Server DTS > September 2005 > Can change SourceObjectName of Data Pump Object?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Can change SourceObjectName of Data Pump Object?
Snake

2005-09-20, 8:23 pm

I am trying to change the SourceObjectName of a datapump which reads an
Excel file. It poops on: tsk.SourceObjectName = "Sheet2$" saying this
method is not supported. OK. I need to read an Excel file whose sheet name
changes each time. DTS defaults to "Sheet1$" which will not work in this
case.

Any ideas? Thanks


Function Main()
Dim pkg, tsk
set pkg = DTSGlobalVariables.Parent
set tsk = pkg.Tasks(" DTSTask_DTSDataPumpT
ask_1")
tsk.SourceObjectName = "Sheet2$"
Main = DTSTaskExecResult_Su
ccess
End Function

Allan Mitchell

2005-09-20, 8:23 pm

Try

set tsk = pkg.Tasks(" DTSTask_DTSDataPumpT
ask_1").CustomTask




"Snake" <Snake@discussions.microsoft.com> wrote in message
news:A4355741-52BF-4C82-8700- 6C7D47CC2655@microso
ft.com:

> I am trying to change the SourceObjectName of a datapump which reads an
> Excel file. It poops on: tsk.SourceObjectName = "Sheet2$" saying this
> method is not supported. OK. I need to read an Excel file whose sheet
> name
> changes each time. DTS defaults to "Sheet1$" which will not work in
> this
> case.
>
> Any ideas? Thanks
>
>
> Function Main()
> Dim pkg, tsk
> set pkg = DTSGlobalVariables.Parent
> set tsk = pkg.Tasks(" DTSTask_DTSDataPumpT
ask_1")
> tsk.SourceObjectName = "Sheet2$"
> Main = DTSTaskExecResult_Su
ccess
> End Function


Allan Mitchell

2005-09-20, 8:23 pm

Try

set tsk = pkg.Tasks(" DTSTask_DTSDataPumpT
ask_1").CustomTask

Allan

"Snake" <Snake@discussions.microsoft.com> wrote in message
news:A4355741-52BF-4C82-8700- 6C7D47CC2655@microso
ft.com:

> I am trying to change the SourceObjectName of a datapump which reads an
> Excel file. It poops on: tsk.SourceObjectName = "Sheet2$" saying this
> method is not supported. OK. I need to read an Excel file whose sheet
> name
> changes each time. DTS defaults to "Sheet1$" which will not work in
> this
> case.
>
> Any ideas? Thanks
>
>
> Function Main()
> Dim pkg, tsk
> set pkg = DTSGlobalVariables.Parent
> set tsk = pkg.Tasks(" DTSTask_DTSDataPumpT
ask_1")
> tsk.SourceObjectName = "Sheet2$"
> Main = DTSTaskExecResult_Su
ccess
> End Function


Darren Green

2005-09-21, 9:24 am

Full example-

Changing the DataPump Source and Destination Tables
(http://www.sqldts.com/default.aspx?213)

"Allan Mitchell" <allan@no-spam.sqldts.com> wrote in message
news:OL7KscjvFHA.2348@TK2MSFTNGP15.phx.gbl...
> Try
>
> set tsk = pkg.Tasks(" DTSTask_DTSDataPumpT
ask_1").CustomTask
>
>
>
>
> "Snake" <Snake@discussions.microsoft.com> wrote in message
> news:A4355741-52BF-4C82-8700- 6C7D47CC2655@microso
ft.com:
>
>



Snake

2005-09-22, 11:24 am

Thanks Darren! Once again you came through! It works great.

"Darren Green" wrote:

> Full example-
>
> Changing the DataPump Source and Destination Tables
> (http://www.sqldts.com/default.aspx?213)
>
> "Allan Mitchell" <allan@no-spam.sqldts.com> wrote in message
> news:OL7KscjvFHA.2348@TK2MSFTNGP15.phx.gbl...
>
>
>

Snake

2005-09-22, 11:24 am

Thanks Allan!

"Allan Mitchell" wrote:

> Try
>
> set tsk = pkg.Tasks(" DTSTask_DTSDataPumpT
ask_1").CustomTask
>
>
>
>
> "Snake" <Snake@discussions.microsoft.com> wrote in message
> news:A4355741-52BF-4C82-8700- 6C7D47CC2655@microso
ft.com:
>
>
>

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com