Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Posts
    254
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Make table or delete all data ? (Access 2000)

    in my everyday work i have to create seceral temporary tables with only 2 fields,send them, and then delete the temporary tables.I have observed that the database get bloated by these deletions. I want advice about the following:
    Isnt it better instead of creating each time a new temproray table, to create a permanent table, append the data and send it. After that i may delete all the data in the temporary table.
    But i am not sure which way is the correct one.

    Up to now i worked by creating for example a temporary table ProductsTemp,
    and after that i deleted this table:

    Function MakeProductsTemp()

    Dim strProducts As String
    strProducts = " SELECT products.Productid, products.branch0, products.items0 INTO ProductsTemp FROM products"
    CurrentDb.Execute strProducts
    CurrentDb.Execute "CREATE INDEX PrimaryKey ON ProductsTemp (ProductID) WITH PRIMARY"
    End Function

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Make table or delete all data ? (Access 2000)

    Appending and deleting records will also bloat the database. Instead of sending a table, you could create a query; since the SQL is fixed, you can create the query once, interactively. There is no need to create it in code.
    And it is a good idea to compact the database regularly anyway. One way to do this is to set Compact on Close in the General tab of Tools | Options.

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Posts
    254
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Make table or delete all data ? (Access 2000)

    I think it is realy a very good advice indeed, and for me it is very precious.I will solve my problem very easily this way
    i wish you a nice day

    Regards

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •