|
-
Mar 3rd, 2001, 12:54 PM
#1
Thread Starter
Addicted Member
Dear all,
I have a problem that confuse me a long time. In the past, JamesM suggests me to use:
' Use the TransferText method of Access for importing text data
Dim accApp As Access.Application
Set accApp = New Access.Application
accApp.OpenCurrentDatabase App.Path & "\database\" & MyDatabaseName & ".mdb", True
accApp.DoCmd.TransferText acImportDelim, "Default Import Specification", MyTableName, MyDataFilePath, True
to import data file into an Access database.
That's OK in the past. But for unknown reasons, it can't work now because of the error:
Error 3027
Cannot update. Database or object is read-only.
But I have checked the property of the mdb file is archive not read only.
I have tried this code both 97 and 2000 and previously work but recently it can't work
Can you help help me please.
Thanks
-
Mar 5th, 2001, 03:33 AM
#2
Fanatic Member
use Access it'self and make sure you can seethe tables. You probably have a lock set on a table somewhere that needs to be manually unlocked through the administrator.
-
Mar 5th, 2001, 06:08 AM
#3
Thread Starter
Addicted Member
Thanks Bill Crawley , But MyTableName is dynamically created
Originally posted by Bill Crawley
use Access it'self and make sure you can seethe tables. You probably have a lock set on a table somewhere that needs to be manually unlocked through the administrator.
Dear Bill,
Thank you very much for your reply.
In my code:
accApp.DoCmd.TransferText acImportDelim, "Default Import Specification", MyTableName, MyDataFilePath, True
Before running, the database does not have the table: MyTableName which I wish Access create for me according to the specification described in "Default Import Specification". Because everytime this staement is executed, the program will stop and prompt error, and so the table isn't created. Thus when I open the database to see, there is no such table generated.
In the past, Access know how to do and no problem but I dun know why it now suffer!!
What you mean by lock set, where should I set back the Access to a normal state. (Or if I interpret this incorrectly.)
Thanks for reply. I appreciate follow-up posts.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|