• Import text file

    Author
    Topic
    #459606

    I am using the following codes to import a text file to a table in serveral databases:

    DoCmd.TransferText acImportDelim, “tblTest Import Specification”, “tbl_List”, “\sharedrivetest.txt”, True

    Can I import the same text file by using the codes above in different databases at the same time? For example, user “A” imports the test text file at 9AM today to database A; and user “B” imports the same test text file at 9AM today too to database B. Is user “B” going to get error message, such as “Can’t find the specifc file?”

    Thanks in advance.

    Viewing 0 reply threads
    Author
    Replies
    • #1159383

      This is likely to be a function of the verison of Access you are using, and the size of the text file. It is possible that the Transfer Text function locks the text file which would prevent UserB from opening it, though it shouldn’t be necessary, since the file is only being read. So I’m afraid testing your version is likely to be the quickest way to find out. And it may be difficult to test if the file is small, as the transfer would only take a second or two for small files. Let us know what you find.

      • #1159466

        This is likely to be a function of the verison of Access you are using, and the size of the text file. It is possible that the Transfer Text function locks the text file which would prevent UserB from opening it, though it should be necessary, since the file is only being read. So I’m afraid testing your version is likely to be the quickest way to find out. And it may be difficult to test if the file is small, as the transfer would only take a second or two for small files. Let us know what you find.

        Yes, you’re right. It’s very difficult to test since the file is 2.11MB. I have tested more than 10 times, which open the two databases at the same time. I wasn’t able to produce any error. So can I assume this should be a issue, since the file is only being read when it is imported?

        Thanks

    Viewing 0 reply threads
    Reply To: Import text file

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: