Solved

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

Posted on 2004-10-19
5
570 Views
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.

Thanks
N.
0
Comment
Question by:ncrew
  • 3
5 Comments
 
LVL 50

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?
0
 
LVL 16

Expert Comment

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

Accepted Solution

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

http://support.microsoft.com/default.aspx?scid=kb;en-us;304206
0
 

Author Comment

by:ncrew
ID: 12352151
Routinet,

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!

Thanks!
N.
0
 
LVL 50

Expert Comment

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

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

762 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now