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 dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete large numbers of records from Linked Table

Status
Not open for further replies.

jambai

Programmer
Mar 21, 2007
58
US
Hi,

How to delete large numbers (100,000 - 1,000,000) records from linked table.

I am trying to delete from MS Access Forms.

Thanks
Jambai
 
yes

I am having more that 200,000 records.

Thanks
 
Ok, I'll rephase that, why not use a delete query?
 
I even say more:
Why not use a pass-through delete query ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
I tried, there is no response..

The query is keep on running.The application hangs up.

The delete query works fine for low records number in the table.

Thanks
Jambai
 
This is the reason why I talked about a pass-through query ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
PHV,

Can you tell me how to write a one.
The below one failed for me.

tempDefTable is from SQLSERVER and the name is NTSQLSERVER
strDelDefTemp = "DELETE OPENQUERY (NTSQLSERVER,'DELETE FROM tempDefTable')"
DoCmd.RunSQL strDelDefTemp

dbo_temDefTable is linked table name.

Thanks
jambai
 
Why not simply execute a SP droping and recreating the table ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Multiple users is going to use this application.So I think droping and recreating will throw some table permission problem..

Please help me, to achieve this using pass-through.

Dim qdfPassThrough As DAO.QueryDef
Dim strConnect As String
strConnect = "Driver=SQL SERVER;SERVER = NTSQLSERVER;Database=TEST;UID=mlp;password=''"
qdfPassThrough.Connect = "ODBC;" & strConnect

Please validate the above

Thanks
Jambai
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top