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!

Access 2000 Transferspreadsheet problem

Status
Not open for further replies.

sorberec

Programmer
Aug 25, 2009
2
GB
Hi all,

I maintain a small Access 2000 database for one region of my company that imports data extracts from several systems from which to produce local management reports.

The extracts are all Excel files and I've been using Transferspreadsheet to import the files into temporary tables. This database has been working fine for over a year now.

I've come back from leave this week to find that one of the databases the extracts come from has been amended so that some of the field names in the extracts are different and now I'm having problems importing these extracts.

I've done the obvious thing of changing the field names in my database to match the new ones in the extracts (there's no chance of getting the source database to revert to the original file names unfortunately) and I've tried just doing an import via the file menu to a new table, deleting records and then importing using Transferspreadsheet into that table but I get the same issue both ways.

The error message I'm getting is "... was unable to append all the data to the table.

The contents of fields in 0 record(s) were deleted, and 0 record(s) were lost due to key violations.
...
Do you want to proceed anyway?"

If I click yes then data imports but there's around a thousand records missing.

As far as I can tell from going over the new extracts and comparing them to the extracts from before the source database changed there are no differences in the record structure or the format of the columns.

I'm stumped as to why this has now stopped working and why I can't get it working again.

 
Two thoughts...

Manually import the file instead of using transferspreadsheet. If that works, note in differences in the tables and fix it.

If that does not work. Try saving the Excel file as a new file and try again. I have seen a tab delimited file given an xls extension so Excel will open it. Excel detects the actual layout... Access on the other hand will probably get confused.
 
Just tried resorting to a backup of the database backend and renaming the column headings in Excel to what the database was expecting them to be and it seems to be working, so i'll probably have to do some code that opens the files up and renames before it tries importing them.
 
Your import process was likely failing AFTER the transferspreadsheet in your original scenario. Probably has something to do with criteria and field names changing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top