The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
|
|
Insert duplicate key error.
Posted: 23 Apr 08 4:33 AM
|
hi slx users..
when i try to post data in saleslogix Legacy Account Form....i get the following error...
"Could not post Data
The statement has been terminated. : Cannot insert duplicate key row in object dbo.ACCOUNT_MISC with unique index 'ACCOUNT_MISC_PRIMARY' "
Thanks in Advance.
|
|
|
|
Re: Insert duplicate key error.
Posted: 24 Apr 08 8:31 AM
|
Just a stab in the dark but I have seen this issue occur when you have a miss-match of versions in your Slx Client Provider and Slx Server components.
The OLE DB Provider does not check against the version of the SLX Server it connects to see if they are compatible. That said the Slx Sales Client will most likely fall over before such a check anyway, but we have seen this when we connect an external application via the provider to an Slx server.
The issue relates to when functionality in the Client and Server Provider components moved about. In v6.x the Client Provider was responsible for record ID allocation, and the Slx Server did not feature in this operation. In v7.x this operation was moved from the Client Provider into the Slx Server (where logically it should sit).
However if you now connect a v7.x Slx Client Provider to a v6.x Slx Server - neither party is responsible for ID allocation - Doh! Net result is the same issue as you are experiencing…!
Sorry if this scenario does not relate to your issue, but I believe a good thing to know about all the same.
Mark Cooper QGate Software Limited
|
|
|
|
Re: Insert duplicate key error.
Posted: 25 Apr 08 5:10 PM
|
I have also seen this when a bug into the code attempts to insert a null into the key field.
In SLX 6 (but apparently not 7) SLX primary key fields and not configured to disalllow nulls in SQL, but they are are configured to be unique. This means that one record with a null key is allowed in the table. When custom code attempts to insert a 2nd record with a null key, you get the "cannot insert duplicate key" error. |
|
|
| |
|
Re: Insert duplicate key error.
Posted: 22 Jun 08 7:55 PM
|
I have also seen this problem when the SITEKEYS table holds incorrect values - in which case an ID can be generated which matches one already in use -> duplicate key error.
Phil |
|
|
|
Re: Insert duplicate key error.
Posted: 23 Jun 08 1:55 AM
|
Indeed so Phil... My previous post is a good example of when and how the SITEKEYS table can get out of sync...
Always happy to help... Mark |
|
|
|