Results 1 to 7 of 7
  1. #1
    Star Lounger
    Join Date
    Aug 2002
    Location
    Des Moines, Iowa, USA
    Posts
    85
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Importing .DAT files into Access (XP)

    I have been given the unenviable job of taking a DOS based system, and relocating it to Access, where we can duplicate the same reports and other functionality, along with adding extra features. Before I get there, I need to know what is the quickest (and least painless) method of importing .DAT files in the DOS system to Access? The import feature in Access does not have an option for .DAT, so I am open to suggestions. <img src=/S/confused.gif border=0 alt=confused width=15 height=20>

    Thank you!!!

  2. #2
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Sacramento, California, USA
    Posts
    491
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Importing .DAT files into Access (XP)

    I'm sure there is a more elegant solution, but this is what I do.

    1- Change the extension to .txt
    2- Use the Import Wizard
    3- Save the specs

    Create a macro.
    Transfer type = Import Fixed Width
    Specification Name = Whatever you named it
    FileName = R:xyz FolderText Filesyourfilename.dat (change directory etc to suit yours)

    Works for me !!

    HTH -
    Michael

  3. #3
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Importing .DAT files into Access (XP)

    As long as the .DAT files are text and don't contain any strange characters apart CR and LF then you should adopt Michael's suggestion.
    Post one of your .DAT files here (as long as it does not contain confidential info) and we'll take a look.

    Pat <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

  4. #4
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Edmonton, Alberta, Canada
    Posts
    326
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Importing .DAT files into Access (XP)

    To elaborate on the other two suggestions, if the DAT files aren't plain text (you didn't say what program produced the DAT files), you'll almost certainly need to get the DOS system to export as text (as long as it produces plain text, you can probably use whatever format is easiest in the DOS system - tab delimited, comma delimited, fixed width, etc). You can then import the text files quite easily into Access.

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Importing .DAT files into Access (XP)

    The reason Access doesn't have a way to import DAT files is because the extension doesn't apply to a single kind of file. Not all DAT files are even database files, some are backup files and even music files. I have rarely encountered DAT files that were text files, but you might be lucky. If they are NOT text files, then you can either try some of the suggestions already offered or look for a data conversion utility. Take a look at Warehouse Workbench, for example.
    Charlotte

  6. #6
    Star Lounger
    Join Date
    Aug 2002
    Location
    Des Moines, Iowa, USA
    Posts
    85
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Importing .DAT files into Access (XP)

    Thank you Michael, Pat, Douglas, and Charlotte for such quick responses. This must be a more common scenario than I first thought. Sorry for the lack of detail. The .DAT file is generated by a DOS program called PowerBase. Upon first impression, it appears to be a combination of the screen layout, followed by data. I will try to find one to use as a guinea pig. Meanwhile, I will try to convert this to .TXT format and see how that goes.

    On a different note, since I have multiple responses to this issue, by answering one response, will the others who also put their two cents worth in also see this response, or do I answer each one individually?

  7. #7
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Sacramento, California, USA
    Posts
    491
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Importing .DAT files into Access (XP)

    As long as you post to the board, everyone sees every post !!

    Michael

Posting Permissions

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