Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Urgent..pls help..Error "Cannot update. Database or object is read 1

Status
Not open for further replies.

bnath001

Programmer
Aug 18, 2000
100
US
Hello,

I am trying to write into a table the contents of a excel file using the following code.

DoCmd.TransferText acImportDelim, , "tblGR_CallableDNIndexStage", nfile

But I keep getting "Cannot update. Database or object is read only.". I checked the database and it not Read only. I do not understand how the table can be read only.

Any ideas please.

thank you
nath


 
You should use TransferSpreadSheet instead of TransferText to import an Excel spreadheet. The error message is referring to the object you are trying to import not the table. Access doesn't recognize the XLS file as a valid importable text file.

Read about TransferSpreadSheet at
Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
The file is a text file (.old) and not a XLS file.
So I used
DoCmd.TransferText acImportDelim, , "tblGR_CallableDNIndexStage", nfile.

where nfile = hello.old

It keeps giving me error "Cannot update. Database or object is read only.".
Pls let me know if you have any other ideas.

thank you
nath
 
Basically, it is the same problem that I mentioned. "OLD" is not a recognized file name extension for text imports. This is part of Access security. Check the following link for a work around.

Acc 2000:

Acc 97:
Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top