[AccessD] Empty and fill tables

Bob Heygood bheygood at abestsystems.com
Thu Oct 21 14:16:29 CDT 2004


Hello to the list,

I have an app that uses linked/attached tables thru ODBC.
When I created the original, I wrote a routine to empty an Access table with
info from the corresponding linked table. This because I felt that I wanted
to not impact the program which uses the table which I was linking to.
The non-Access linked tables are linked to the F End. The Access tables I
fill are in the back end.
This "empty and fill" operation always took awhile but recently jumped to 59
minutes.
Five tables -  one over 106,000 record.
A version 2K

Code - - -
EMPTY - -
Dim strSQL As String

DoCmd.Hourglass True
DoCmd.SetWarnings False
strSQL = "Delete * From tblTransactions"

DoCmd.RunSQL (strSQL)

FILL - -

Dim strSQL As String

DoCmd.Hourglass True
DoCmd.SetWarnings False
strSQL = "Insert into tblTransactions Select * From pMWTRN"

DoCmd.RunSQL (strSQL)


DoCmd.Hourglass False
DoCmd.SetWarnings True

My question:
Can I do this faster/better?


TIA,

Bob






More information about the AccessD mailing list