Solved

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

Posted on 2004-10-19
5
572 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Search for text in a .txt file 14 40
Access 2003 query lost it's only join 7 24
SQL multicriteria from ONE textbox 32 41
Criteria for Date for DCount 4 16
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

816 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

11 Experts available now in Live!

Get 1:1 Help Now