Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Weird TransferText problem

Status
Not open for further replies.

EvilCabal

Programmer
Jul 11, 2002
206
CA
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.
 
Thanks but I had already read that article looking for an answer. In my case the tranfer text really isn't working because the data is not transfered in the table. I can tell the error comes from inside the TransferText function itself because, after the error, the progress bar showing the progress of the import is stuck and soon after this I often get an error that forces me to close the database.

Another wierd thing that happens after the TransferText error is that I can't save anymore. I can click the save button and everything appears to be normal (the DB ask what object are to be saved, etc...) but when I close the DB and reopen it my post-error changes where dropped... This is really weird.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top