Delete data in a linked SQL table using Access

G

Guest

Hi there!

I have an access database which operates as a front end for my SQL database.
I post data from an OO db to SQL via Access and ODBC.
This data is refreshed daily and so I want to delete the existig data in the
SQL tables before posting the fresh lot through.

I have tried using the normal DELETE query in Access but get an error
message: "Could not delete from specified tables". (Currently I am manually
deleting the data using SQL Server Query Analyzer and the truncate table
command which is so fast but I can't use this in access!)

Is there an easy way to delete the data direct from Access? Note: I use
Access quite a bit but only at a basic level.

Cheers!
 
J

John Vinson

On Tue, 1 Mar 2005 20:33:01 -0800, Mezza, NZ <Mezza,
Is there an easy way to delete the data direct from Access? Note: I use
Access quite a bit but only at a basic level.

Try using a PassThrough query: it's a query in SQL/Server syntax
(including TRUNCATE tablename; or any other valid SQL dialect query),
which Access will hand to the SQL engine uninspected.

See PassThrough in the help for details.

John W. Vinson[MVP]
 
G

Guest

Hi there John!

Awesome! Thanks so much for that pointer. I checked out the help files in
Access and it has solved my problem perfectly!

Thanks again for taking the time to help. I really do appreciate it.

Cheers!

Mezza
 
N

nadyn

hi meza
Hi there John!

Awesome! Thanks so much for that pointer. I checked out the help files in
Access and it has solved my problem perfectly!

Thanks again for taking the time to help. I really do appreciate it.

Cheers!

Mezza
 

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