Delete contents of other database

W

Wayne-I-M

Hi

Is there a way to delete the contents of a table in an other database
without opening the other database?

Ha ha ha now if that doesn’t sound like a malicious code I don’t know what
does.

“But†in this case it’s not. We have an access DB (on-line) that is
imported to a temp folder and then some of the data is imported to our main
DB via an append. I would like to be able to delete the contents of the DB
in the temp folder before it’s sent back on-line (to reduce the file size of
our on-line DB).

I can simply set up a number of “things†that will do this but they all
require a call to the external DB and then opening it before the table
contents are deleted – I can also get the other D to close, etc etc.

But – is there a way to delete the table contents (not the table) without
opening the outside DB ? I have tried quite a few methods and all I ended up
doing was hiding the fact that it was open (putting it in the background,
minimize, etc, etc.) I would rather it was not opened at all. I have search
the MS site for where the a table contents are but this just keeps saying
that it’s not possible to isolate the contents of a DB from the DB itself.

Any ideas would be really helpful

Thank you
 
J

John W. Vinson

Hi

Is there a way to delete the contents of a table in an other database
without opening the other database?

Ha ha ha now if that doesn’t sound like a malicious code I don’t know what
does.

“But” in this case it’s not. We have an access DB (on-line) that is
imported to a temp folder and then some of the data is imported to our main
DB via an append. I would like to be able to delete the contents of the DB
in the temp folder before it’s sent back on-line (to reduce the file size of
our on-line DB).

I can simply set up a number of “things” that will do this but they all
require a call to the external DB and then opening it before the table
contents are deleted – I can also get the other D to close, etc etc.

But – is there a way to delete the table contents (not the table) without
opening the outside DB ? I have tried quite a few methods and all I ended up
doing was hiding the fact that it was open (putting it in the background,
minimize, etc, etc.) I would rather it was not opened at all. I have search
the MS site for where the a table contents are but this just keeps saying
that it’s not possible to isolate the contents of a DB from the DB itself.

You should be able to execute a Query referencing the other database using an
IN clause:


DELETE * FROM tablename IN "C:\somepath\otherdatabase.mdb";

Or you can use File... Get External Data... Link to link to the other database
(without opening its user interface, just connecting to it) and run queries
against the linked table.
 
D

Douglas J. Steele

John W. Vinson said:
You should be able to execute a Query referencing the other database using
an
IN clause:


DELETE * FROM tablename IN "C:\somepath\otherdatabase.mdb";

Or you can use File... Get External Data... Link to link to the other
database
(without opening its user interface, just connecting to it) and run
queries
against the linked table.

Note, though, that deleting data from the file won't change its size.

The space won't be release until you compact the database.
 
W

Wayne-I-M

Many thanks Douglas and John

I can run the compact no problem it was the data that was the problem. I
will give it a try in the morning

Thanks again
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top