Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to truncate an oracle table from ms access

Status
Not open for further replies.

MJD1

Technical User
Joined
Jul 18, 2003
Messages
134
Location
CA
Hi, I'm working on a project where we are migrating an ms access backend db to Oracle. one of the things I need to do efficiently is delete an oracle table. when using the delete function, it takes forever. I understand that there is a way to "truncate" the table which is much faster, but I have yet figured out how to do it.

I have tried the below, but it didn't work:

'Dim dbs1 As Database
Set dbs1 = CurrentDb
dbs1.Execute "Truncate Table " & NVR0_offline


any help is appreciated
 
In SQL Server the connecting user (be it via proxy account or otherwise) must also be dbo on the database in order to truncate a table. I belive in Oracle, permissions to drop any table must be granted to the user or a procedure created that performs the drop for which the user is granted execute privileges.


Mark

"You guys pair up in groups of three, then line up in a circle."
- Bill Peterson, a Florida State football coach
 
I haven't done this in Oracle but have in MSSQL. I have historically used a pass-through query. This allows you to use Oracle (or MSSQL) statements direct through Access. You need to configure the query to use a connection string to your Oracle DB. Maybe the same ODBC you are using to link your tables.

I don't believe truncate is an available statement in Access.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top