dbTalk Databases Forums  

Create Table dynamically in Script?

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


Discuss Create Table dynamically in Script? in the microsoft.public.sqlserver.dts forum.



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

Default Create Table dynamically in Script? - 05-16-2006 , 10:10 AM






I am creating a DTS package from a VB application. I have no problem
creating and connecting to the Source and Destination data sources. I also
have no problem with the Data Pump to transfer the data from source to
destination.

Is there a way to read the Source tables properties, to dynamically write
the 'Create Table' query? The wizard does this for you automatically, but I
need to do it from VB code. If anyone has an example of this, please post
it.

Basically, I'm writting an application that will take a list of tables from
the source database, create the table on the destination database, copy the
data from the source to the destination. I need to have one DTS Package for
each table. I've got everything but the Create Table task done.


Thank you,

Scott



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

Default Re: Create Table dynamically in Script? - 05-17-2006 , 06:43 PM






Hello Scott,

You could query INFORMATION_SCHEMA.COLUMNS for the table in Question and
derive the info from there.


Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com

Quote:
I am creating a DTS package from a VB application. I have no problem
creating and connecting to the Source and Destination data sources. I
also have no problem with the Data Pump to transfer the data from
source to destination.

Is there a way to read the Source tables properties, to dynamically
write the 'Create Table' query? The wizard does this for you
automatically, but I need to do it from VB code. If anyone has an
example of this, please post it.

Basically, I'm writting an application that will take a list of tables
from the source database, create the table on the destination
database, copy the data from the source to the destination. I need to
have one DTS Package for each table. I've got everything but the
Create Table task done.

Thank you,

Scott




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

Default Re: Create Table dynamically in Script? - 05-17-2006 , 06:46 PM



Hello Scott,

You could query INFORMATION_SCHEMA.COLUMNS for the table in Question and
derive the info from there.


Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com

Quote:
I am creating a DTS package from a VB application. I have no problem
creating and connecting to the Source and Destination data sources. I
also have no problem with the Data Pump to transfer the data from
source to destination.

Is there a way to read the Source tables properties, to dynamically
write the 'Create Table' query? The wizard does this for you
automatically, but I need to do it from VB code. If anyone has an
example of this, please post it.

Basically, I'm writting an application that will take a list of tables
from the source database, create the table on the destination
database, copy the data from the source to the destination. I need to
have one DTS Package for each table. I've got everything but the
Create Table task done.

Thank you,

Scott




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.