FIle is Read Only

rschultz

Registered User.
Local time
Today, 21:47
Joined
Apr 25, 2001
Messages
96
I tried to delete all the records in a table and then import new data froma text file. I tried:

DoCmd.RunSQL "delete * from ZPAY6176"
DoCmd.TransferText acImportDelim, , "ZPAY6176", "H:\Access\New Carpool\z_pay617.lis", False


Which deleted all the records but then I got a:

"Cannot Update. Database or Object is Read Only"

Is that because the table ZPAY6176 is still being used by me? Do I need to release it somehow? If so, how? If not, how do I get around this?

I checked and the database is not read only. And I can manually add new records to test if the new ones are deleted when I click the button with the above code and they delete again too.
 
Pat Hartman said:
The problem is a relatively new "feature" of Jet's. It cannot process files except those with specific extensions such as .txt and .cvs. So, rename the file you are trying to import so that it has a standard text file extension.

If this is a process that you need to automate, you can use the Name statement to rename DOS files. Look it up in help.

Ah, okay I will try that. Thanks
 

Users who are viewing this thread

Back
Top Bottom