Groups | Blog | Home
all groups > sql server dts > february 2007 >

sql server dts : Execute Access VBA Macro from DTS


ricky
2/27/2007 6:25:55 PM
Hi

I have a DTS package that populates an Access Database, for offline
reporting etc..

I was wondering if there is a way I can clear down the MS Access tables from
the DTS package.

I have a macro in the Access that performs this function, but I thought it
would be smarter if this was administered before the data load.

Kind regards

Ricky
(SQL2K/MS Access 2002)

RLoski
2/28/2007 11:41:15 AM
Do you want to delete all of the records in your access database?
--
Russel Loski, MCSD.Net


[quoted text, click to view]
ricky
3/1/2007 12:00:00 AM
Good morning

Thank you for your reply. I was wondering if one is able to specify which
records in a table to delete, but if that is not possible, then clearing
down all records in the Access Database will be sufficient, since I may wish
to keep some generic lookup tables, but this may not be an issue, since I
could probably upload the data via another datapump.

Kind regards

Ricky



[quoted text, click to view]

AlterEgo
3/1/2007 10:27:09 AM
ricky,

You can use the "Execute SQL Task".

1. Add a connection to the Access DB.
2. Add an Execute SQL Task using the Access connection from step #1.
3. Enter whatever delete statement you want for the SQL Statement field:

delete from MyTable where ...

-- Bill

[quoted text, click to view]

ricky
3/2/2007 4:11:07 PM
does that mean there is no real way to interact with VBA Macros contained in
MS Access from DTS?


[quoted text, click to view]

AddThis Social Bookmark Button