Access 2003: Can't export to a *.dat file

Posted on 2004-10-19
Medium Priority
Last Modified: 2012-06-21
I have a split database using Access 2003.  I've written code to export query results to a *.dat file.  See below:
DoCmd.TransferText acExportDelim, "Tabquick Labels", stDocName, "\\pd0ns-wdc002\projdoc$\nsgs.dat"  

When this runs I get a MS Access error "Cannot Update.  Database or Object is read only"

I've verified that  I have full rights to the database and all the objects inculding MSysIMEXColumns and MSysIMEXSpecs.

If I try to export this as any other format, i.e. *.txt, it works fine.

What do I need to do to export to a *.dat file?

Some history on this database:  This was a AC97 database with the tables and other objects all in one mdb.  This piece of code does work under these conditions so I'm not sure if it's because the database is split or if it is because it has been converted to 2003.

Question by:ncrew
  • 3
LVL 51

Expert Comment

by:Steve Bink
ID: 12351839
Export to a text file, then rename it after the fact to .dat.  Is there a reason you need to use .dat over .txt?
LVL 16

Expert Comment

ID: 12351848
I think .dat is a special type of file. Try exporting to a .txt extension file and then renaming it to .dat.
LVL 51

Accepted Solution

Steve Bink earned 2000 total points
ID: 12351853
Here's the relevent link from Microsoft.  This is for Office 2000, but it likely applies to 2003 as well:


Author Comment

ID: 12352151

You're the greatest!  Because I have 2003 I had to go a little deeper into the registry than the paper listed, but I found it and this works great!

LVL 51

Expert Comment

by:Steve Bink
ID: 12352256
Anytime.  :)  Good luck with the rest of your project!

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Suggested Courses

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question