Solved

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

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

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

685 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