I have a problem.
I am looking to insert data into a table in an Access Database. The data inserts into the table perfectly but brings up an error in the browser pointing to the line where it executes the sql. The error is:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again.
In my table I have 2 fields that I want as the primary key - Username, and ScreenName (because one user can have several different screen names, but none of the same name). I have clicked the key symbol in access on both of these rows (in the design view) to make these the primary key. This seems fine to me. Even when I insert the data from the website it inserts fine. But this error comes up and halts the user. I'm DEFINITELY not inserting some data which already has the same username/screen_name combination as a record in the table. I'm not big on my databases, so need to know how to get round this.
I'm using IIS and running everything on my local PC. I don't understand why it throws up this error but still inserts the correct data into the database...
Thanks for any help.
I am looking to insert data into a table in an Access Database. The data inserts into the table perfectly but brings up an error in the browser pointing to the line where it executes the sql. The error is:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again.
In my table I have 2 fields that I want as the primary key - Username, and ScreenName (because one user can have several different screen names, but none of the same name). I have clicked the key symbol in access on both of these rows (in the design view) to make these the primary key. This seems fine to me. Even when I insert the data from the website it inserts fine. But this error comes up and halts the user. I'm DEFINITELY not inserting some data which already has the same username/screen_name combination as a record in the table. I'm not big on my databases, so need to know how to get round this.
I'm using IIS and running everything on my local PC. I don't understand why it throws up this error but still inserts the correct data into the database...
Thanks for any help.