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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DTS error at last row

Status
Not open for further replies.

gdeleon

Instructor
Jan 11, 2002
10
I am importing data from dbf tables into SQL 7 using the DTS wizard.
I import several tables without problem, but with some others I get the error:
"Error at destination for row number nnnnn...
Violation of primery key contraint.... Cannot insert duplicate key in object..."

There is no duplicate keys in the source table. I reduced the number of rows and still get the error always on last row.

Any help will be appreciated.

Gustavo de Leon
 
I have seen that the last record may contain NULL values. you may want to check your last record in you export table. Then check your destination table, if it has records in it already, for a NULL in the primary key field(s).
 
I finally found the problem: I was importing from Visual Foxpro dbf tables to SQL tables. Visual Foxpro is case sensitive and the sort order I am using in SQL Server is not. So, some keys like "G" and "g" are different for VFP but not for SQL Server.

Thank you

Gustavo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top