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

    exporting text with a .dat extension

    I have a user who is bascically a pain in the neck!! Any way. This user would like to export a table from Access 97 to his hard drive with a .dat extension. I made him a nice little macro (Using transfertext method) that will export the file Fixed Width to his hard drive but it when I try to save it as file.dat instead of file.txt it gives me an error "Can't update. Data base or object is read only." Anybody ever do anyhting like this before? The is no security set up on the database and when I save the file as file.txt it exports fine.. Thanks for the help..

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

    Re: exporting text with a .dat extension

    Windows recognizes .dat as a database extension. I think it's what bTrieve used, and you may have a converter somewhere that is trying to handle it. The simplest workaround is to save it with a txt extension and then change the file name.
    Charlotte

  3. #3
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Youngstown, Ohio, USA
    Posts
    705
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: exporting text with a .dat extension

    I'm having a similar problem, exporting to a PRN file -- so the DAT extension may not be the culprit.

    Here's my scenario, and maybe someone can make some sense out of it (Access 2000 SR-1):

    I have some databases successfully set up to import spreadsheets and export delimited text files, using TransferText for the export. The exports have the following settings: Export Delimited; ??_AS400; Query1; C:WindowsDesktop??_AS400.PRN; No. This setup is virtually identical to the transfers used in the working databases, but this one keeps giving a "Read Only" error each time it tries to execute.

    I have gotten this error with the other databases from time to time, only to have the problem go away on its own -- leaving no clues as to why it happened, or why it stopped erroring. Nothing is write-protected. I can manually export the query results to Query1.TXT using the export specification without any problems, but Query1.PRN fails.

  4. #4
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: exporting text with a .dat extension

    Somewhere along the line, MS decided that for safety reasons it would restrict the TextTransfer methods to only certain extensions. So as Charlotte said, the easiest workaround is just to use a .txt extension (you can also use .csv, .tab, .asc, .htm, and .html.

    The alternative is to modify the Windows Registry. See Q245407 in MSKB for details.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  5. #5
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Youngstown, Ohio, USA
    Posts
    705
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: exporting text with a .dat extension

    Hacking the registry did the trick! <img src=/S/groovin.gif border=0 alt=groovin width=21 height=21>

    I added PRN to both registry keys to allow both imports and exports to operate with this file extension. The KB article also gave me some insight into why the transfers were working sporadically... I develop on my Wintel PC, but the conversion databases are run in the computer room on an NT machine; I keep mine updated regularly, so I was running into the Jet update "fix" and encountering errors while the non-updated NT machine kept churning away without a problem.

Posting Permissions

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