Results 1 to 3 of 3

Thread: Why Cannot Update> Very Odd! Please Help

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2000
    Location
    hongkong
    Posts
    251
    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

  2. #2
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Dunmow,Essex,England
    Posts
    898
    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.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Nov 2000
    Location
    hongkong
    Posts
    251

    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
  •  



Click Here to Expand Forum to Full Width