Hi,
I have a procedure that uses the TransferText method to import data from a flat file to a table. This procedure was working fine until this morning when I made a change to it. The change was NOT related to the TransferText part but I tracked down the error to the line of the transfer text. (The error is 2501 - The TransferText action was cancelled)
So I tried dropping the changes I had made to the procedure. Same problem. Then I tried calling TransferText from the debug window. Same problem. After a lot of test I found that the error only happened on one particular table, (the one I needed in the procedure of course) On any other table it worked fine.
All the table in this database are linked so I tried removing the link of the fautive table and instead I imported it directly to the database. No more errors. But I need this table to be linked, because more than one person is using it on the network. So I need another solution.
Here is a list of what I tried :
-I repaired both the FE and the BE
-I deleted the table on the BE, rebuilded it from scratch and relinked it.
-I transfered every object in the FE & BE to a clean new database
-I tried dozens of different flat files
BTW no one was using the database when it happened so I can't be related to a sharing problem.
I know I could write a function to emulate the transfertext but I'd really like to know what is going on.
Here is the TranferText line :
docmd.TransferText acImportDelim, "", "MyTable", "MyFile",false,""
Thank you very much for any help.
I have a procedure that uses the TransferText method to import data from a flat file to a table. This procedure was working fine until this morning when I made a change to it. The change was NOT related to the TransferText part but I tracked down the error to the line of the transfer text. (The error is 2501 - The TransferText action was cancelled)
So I tried dropping the changes I had made to the procedure. Same problem. Then I tried calling TransferText from the debug window. Same problem. After a lot of test I found that the error only happened on one particular table, (the one I needed in the procedure of course) On any other table it worked fine.
All the table in this database are linked so I tried removing the link of the fautive table and instead I imported it directly to the database. No more errors. But I need this table to be linked, because more than one person is using it on the network. So I need another solution.
Here is a list of what I tried :
-I repaired both the FE and the BE
-I deleted the table on the BE, rebuilded it from scratch and relinked it.
-I transfered every object in the FE & BE to a clean new database
-I tried dozens of different flat files
BTW no one was using the database when it happened so I can't be related to a sharing problem.
I know I could write a function to emulate the transfertext but I'd really like to know what is going on.
Here is the TranferText line :
docmd.TransferText acImportDelim, "", "MyTable", "MyFile",false,""
Thank you very much for any help.