dbTalk Databases Forums  

Where is the table_source coming from in the auto-generated DTS vb code

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Where is the table_source coming from in the auto-generated DTS vb code in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Eddie Suey
 
Posts: n/a

Default Where is the table_source coming from in the auto-generated DTS vb code - 10-09-2003 , 09:40 AM






I created a DTS import that copies data from and excel file to a SQL2000
table. In the vb code there is a DTSDataPumpTask being created and then a
SELECT statement that is selecting all the data to be copied. IN the SELECT
statement in the FROM clause there is a reference to what I thought was the
Excel sheet name. However, when I changed the sheet name in the excel file,
everything still ran correctly. I want to change this table_source name in
the vb code, so what do I need to do?





Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Where is the table_source coming from in the auto-generated DTS vb code - 10-09-2003 , 10:30 AM






The SourceObjectName should be the object you are looking for. The object
is not the Sheet necessarily rather the named range (table). You can have
multiple named ranges per worksheet.

--
--

Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org

"Eddie Suey" <esuey (AT) inBizServices (DOT) com> wrote

Quote:
I created a DTS import that copies data from and excel file to a SQL2000
table. In the vb code there is a DTSDataPumpTask being created and then a
SELECT statement that is selecting all the data to be copied. IN the
SELECT
statement in the FROM clause there is a reference to what I thought was
the
Excel sheet name. However, when I changed the sheet name in the excel
file,
everything still ran correctly. I want to change this table_source name
in
the vb code, so what do I need to do?







Reply With Quote
  #3  
Old   
Eddie Suey
 
Posts: n/a

Default Re: Where is the table_source coming from in the auto-generated DTS vb code - 10-09-2003 , 12:08 PM




There was no assignment to the object SourceObjectName in the
auto-generated file. But, I added one and it worked great! Thanks.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.