Results 1 to 5 of 5
  1. #1
    metro17 is offline Novice
    Windows XP Access 2000
    Join Date
    Sep 2009
    Posts
    4

    Update / delete and recreate access tables

    I have a macro which deletes an recreates a table and imports data from a text file into the table and this happens after access database starts based on a preset time using the windows
    scheduler. I want to know if its possible to update ( or delete and recreate ) the access table from the text file without starting the access database .


    Thanks

  2. #2
    dcrake's Avatar
    dcrake is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Aug 2009
    Posts
    435
    The major issue here is why are you deleting the TABLES instead of the CONTENTS of the tables. Then use an append query to copy the data into the existing table. By using the process you have in place will make the tables unstable as Access will determine at point of creation what type of field eacg field will be based on the first record in the file. Also it will assign 255 characters to each text field and will not assign a primary key.

    Suggest you look at the option mentioned above.

    David

  3. #3
    metro17 is offline Novice
    Windows XP Access 2000
    Join Date
    Sep 2009
    Posts
    4

    Update table

    I want to know if its possible to update the access table from the text file without starting the access database .
    Thanks

  4. #4
    dcrake's Avatar
    dcrake is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Aug 2009
    Posts
    435
    The target database does not necessarily need to be opened, however, some sort of engine must be activiated in order to run the macro or code. You could investigate the use of MS Scripting code to create a vbs file which can be run from the scheduler. If coded correctly Access will not be loaded into the foreground at any point. By using ADODB or DAO you can open it blindly.

    David

  5. #5
    metro17 is offline Novice
    Windows XP Access 2000
    Join Date
    Sep 2009
    Posts
    4
    appreciate the reply. Can you throw more light on this.Sounds latin to me .
    Any test codes which I lay my hands on.
    Thanks

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 08-06-2009, 11:49 PM
  2. auto update of two linked tables
    By colenzo in forum Access
    Replies: 4
    Last Post: 07-20-2009, 09:08 AM
  3. update tables via forms
    By jazoo in forum Forms
    Replies: 0
    Last Post: 09-16-2008, 05:54 AM
  4. Could not delete from specified tables.
    By bullwinkle55423 in forum Queries
    Replies: 0
    Last Post: 08-31-2006, 08:14 AM
  5. Update Tables
    By lschlitt in forum Programming
    Replies: 2
    Last Post: 05-28-2006, 02:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums - Senior Forums