Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Monday, November 25, 2024 
 
slxdeveloper.com Community Forums  
   
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!
 Architect Forums - Legacy Development
Forum to discuss SalesLogix legacy development including views, scripts, etc.. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to Legacy Development | New ThreadView:  Search:  
 Author  Thread: Insert duplicate key error.
satz
Posts: 75
 
Insert duplicate key error.Your last visit to this thread was on 1/1/1970 12:00:00 AM
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.

[Reply][Quote]
Mark Cooper
Posts: 9
 
Re: Insert duplicate key error.Your last visit to this thread was on 1/1/1970 12:00:00 AM
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
[Reply][Quote]
Dan Carvin
Posts: 227
 
Re: Insert duplicate key error.Your last visit to this thread was on 1/1/1970 12:00:00 AM
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.
[Reply][Quote]
SanIP
Posts: 3
 
Re: Insert duplicate key error.Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Jun 08 10:49 AM
Thanks Mark, that helped me resolve a similar issue.
[Reply][Quote]
Phil Parkin
Posts: 819
Top 10 forum poster: 819 posts
 
Re: Insert duplicate key error.Your last visit to this thread was on 1/1/1970 12:00:00 AM
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
[Reply][Quote]
Mark Cooper
Posts: 9
 
Re: Insert duplicate key error.Your last visit to this thread was on 1/1/1970 12:00:00 AM
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
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 11/25/2024 9:45:55 AM