April 30, 2005 at 12:03 pm
Greetings and thanks!
I am uploading some data into a SQL 2k DB linked to MS Access 2003 .mdb application. The table I am trying to upload to is currently empty and is a connection or interface table with two FK ID columns.
When I click the append button, I get an error message that none of the records were added because of key violations.
I went into the SQL table and temporarily eliminated the keys on the two columns. Same error.
Any suggestions? Thanks
I would do this on the SQL side if I were as facile with queries there (I'm not).
Sam
April 30, 2005 at 8:01 pm
Just a hunch, but when you change the table definition in SQL you usually need to refresh the link from Access. I know this is the case when adding new columns, so it might also be the case with constraints.
Aunt Kathi Data Platform MVP
Author of Expert T-SQL Window Functions
Simple-Talk Editor
May 1, 2005 at 2:57 pm
Thanks, Kathi.
I found the issue, in case anyone else encounters this. It had nothing to do with key violations. One of the columns was NOT NULL and a value was not being supplied. I just added a default for that column and the upload was successful. This is not the first time I've known MS Access to give wrong error messages that obscure the issue rather than help elucidate it.
Sam
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply