dbTalk Databases Forums  

Dynamically exporting tables and data to Access

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


Discuss Dynamically exporting tables and data to Access in the microsoft.public.sqlserver.dts forum.



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

Default Dynamically exporting tables and data to Access - 03-21-2006 , 12:34 PM






Hi

Sorry if this is a FAQ, I tried to search the archives but was unable
to find it.

I need to dynamically export all tables and views from SQL Server to
Access. The Access database do not contain the table so this has to be
dynamically created, no transformation should be done.

It could be several tables or one single it will be scheduled so there
is no option like creating a manual export task as there may be changes
in the table structure.

I tried to solve my problem using SELECT INTO from SQL but since this
seems to not work using a linked server in the INTO clause.

I also looked at using the DTS Bulk export task from
http://www.sqldts.com/default.aspx?272 but this only exports to txt and
csv.

Thanks
Si


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

Default Re: Dynamically exporting tables and data to Access - 03-21-2006 , 01:35 PM






Hello Si,

Ok so one way to do it would be to read the tables collection in Access and
compare to whether that table is already in SQL Server. if it is not then
you read the metadata about that table from access and generate a CREATE
TABLE statement for SQL Server. You then need to dynamically build the transformations
between the Access table and the SQL Server table.

You will only ever have 1 * Transform Data task and you regenerate the definition
every time.


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

Quote:
Hi

Sorry if this is a FAQ, I tried to search the archives but was unable
to find it.

I need to dynamically export all tables and views from SQL Server to
Access. The Access database do not contain the table so this has to be
dynamically created, no transformation should be done.

It could be several tables or one single it will be scheduled so there
is no option like creating a manual export task as there may be
changes in the table structure.

I tried to solve my problem using SELECT INTO from SQL but since this
seems to not work using a linked server in the INTO clause.

I also looked at using the DTS Bulk export task from
http://www.sqldts.com/default.aspx?272 but this only exports to txt
and csv.

Thanks
Si



Reply With Quote
  #3  
Old   
Si
 
Posts: n/a

Default Re: Dynamically exporting tables and data to Access - 03-21-2006 , 05:03 PM



Hello Allan,
Thanks for your answer maybe I was a bit unclear it is from SQL to
Access but I guess that I need to do something similar. I was looking
for pointers on how to do it, you know code that you do not have to
write is good code. :-)

Thanks
Si


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.