dbTalk Databases Forums  

Export to Access Database

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


Discuss Export to Access Database in the microsoft.public.sqlserver.dts forum.



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

Default Export to Access Database - 08-21-2005 , 01:30 AM






I have created a package that just export a number of tables to an Access
Database and it works fine.

However, when I rerun the package, I get error message as it cannot create
the tables (This is because they are already exists in the Access database).

What is a better way for me to handle this problem ?

A fellow has suggested creating an 'execute SQL task', that checks for the
existence of the table first, and drops it if needed. However, I don't know
how to create that task, is it possible to give me some advice ?

Thanks



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

Default Re: Export to Access Database - 08-21-2005 , 01:42 AM






Are you using the wizard or are you using a package?

If the former then in the wizard there is an option to turn off the
"Recreate" functionality. If the latter then have a look at the package and
find the step that does the CREATE of the tables and remove it.

Sure you could look to DROP and then CREATE the tables but that would mean
you transfer all rows again all the time basically destroying any work you
have done in Access. This may or may not be acceptable.

Allan


"Jason" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
I have created a package that just export a number of tables to an Access
Database and it works fine.

However, when I rerun the package, I get error message as it cannot create
the tables (This is because they are already exists in the Access
database).

What is a better way for me to handle this problem ?

A fellow has suggested creating an 'execute SQL task', that checks for the
existence of the table first, and drops it if needed. However, I don't
know how to create that task, is it possible to give me some advice ?

Thanks





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

Default Re: Export to Access Database - 08-24-2005 , 05:38 AM



Dear Allan,

I find that the "Drop and Recreate Table" option is in the Transformation
button. I have re-created the DTS package with wizard. It runs with error
the first time (There is nothing to drop) but it works fine when I re-run
it.

Thanks
Jason

"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote

Quote:
Are you using the wizard or are you using a package?

If the former then in the wizard there is an option to turn off the
"Recreate" functionality. If the latter then have a look at the package
and find the step that does the CREATE of the tables and remove it.

Sure you could look to DROP and then CREATE the tables but that would mean
you transfer all rows again all the time basically destroying any work you
have done in Access. This may or may not be acceptable.

Allan


"Jason" <anonymous (AT) discussions (DOT) microsoft.com> wrote in message
news:%23FjvXihpFHA.736 (AT) tk2msftngp13 (DOT) phx.gbl...
I have created a package that just export a number of tables to an Access
Database and it works fine.

However, when I rerun the package, I get error message as it cannot
create the tables (This is because they are already exists in the Access
database).

What is a better way for me to handle this problem ?

A fellow has suggested creating an 'execute SQL task', that checks for
the existence of the table first, and drops it if needed. However, I
don't know how to create that task, is it possible to give me some advice
?

Thanks







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

Default Re: Export to Access Database - 08-24-2005 , 01:59 PM



Correct that is exactly what it will do. Are you saving the package? If
you are then open up the package and remove the step that does the drop.

Allan


"Jason" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
Dear Allan,

I find that the "Drop and Recreate Table" option is in the Transformation
button. I have re-created the DTS package with wizard. It runs with
error the first time (There is nothing to drop) but it works fine when I
re-run it.

Thanks
Jason

"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message
news:O1xIvthpFHA.3244 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
Are you using the wizard or are you using a package?

If the former then in the wizard there is an option to turn off the
"Recreate" functionality. If the latter then have a look at the package
and find the step that does the CREATE of the tables and remove it.

Sure you could look to DROP and then CREATE the tables but that would
mean you transfer all rows again all the time basically destroying any
work you have done in Access. This may or may not be acceptable.

Allan


"Jason" <anonymous (AT) discussions (DOT) microsoft.com> wrote in message
news:%23FjvXihpFHA.736 (AT) tk2msftngp13 (DOT) phx.gbl...
I have created a package that just export a number of tables to an Access
Database and it works fine.

However, when I rerun the package, I get error message as it cannot
create the tables (This is because they are already exists in the Access
database).

What is a better way for me to handle this problem ?

A fellow has suggested creating an 'execute SQL task', that checks for
the existence of the table first, and drops it if needed. However, I
don't know how to create that task, is it possible to give me some
advice ?

Thanks









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.