Creating temporary table in Access 2000

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I can create a table with the following code but the table is not deleted
when I close the application.

DoCmd.RunSQL "CREATE TABLE tblTemp(Name Text (255),Qty Number); "

How can I create a temporary version of this same table that will be deleted
when the application is closed? I've tried putting TEMPORARY between CREATE
and TABLE without success.
 
Hi,
there in no temp tables in jet. you can either delete it on app close (some
hidden form unload event) or delete every time before create, if it still
exists
 
Thank you. Deleting the table is the work around I've been using, but I was
hoping for something better.
--
Thank you,
Del


Alex Dybenko said:
Hi,
there in no temp tables in jet. you can either delete it on app close (some
hidden form unload event) or delete every time before create, if it still
exists
 
Thank you. Deleting the table is the work around I've been using, but
I was hoping for something better.

The something better is to create the temp table in a new temporary mdb
file. There is an api call to get a unique filename in the user's temp
folder. All you have to do is Kill it when the application closes and you
don't get any bloat at all in the real mdb.

Hope that helps


Tim F
 
Back
Top