Print Page | Close Window

Help - error sending PM

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=19736
Printed Date: 12 April 2026 at 12:12am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Help - error sending PM
Posted By: supertramp
Subject: Help - error sending PM
Date Posted: 06 May 2006 at 5:11am
Everything was working OK. Then started getting this error:-

Microsoft OLE DB Provider for SQL Server error '80040e2f'

Violation of PRIMARY KEY constraint 'PK__tblPMMessage__0EA330E9'. Cannot insert duplicate key in object 'tblPMMessage'.

/forum/pm_new_message.asp, line 358

Any ideas what's up?

Only thing was that the SQL Server went down cause the log file was full. Cleared the log file and then the error.

Just found that I'm getting the same error when trying to add a forum using Email Notify.

Microsoft OLE DB Provider for SQL Server error '80040e2f'

Violation of PRIMARY KEY constraint 'PK__tblEmailNotify__24927208'. Cannot insert duplicate key in object 'tblEmailNotify'.

/forum/email_notify.asp, line 235

Have checked the number of records in each table. Only thing I can think is that the database file has become corrupt. PK is seed 1 increment 1.

-------------
Don't eat the clown fish. They taste funny.



Replies:
Posted By: supertramp
Date Posted: 06 May 2006 at 8:31am
Ok I feel like I'm talking to myself here (Pending Approval). Still not sure why this has happened but have a workaround. I backed up the production db and restored on my local server. Produced a test PM and got the same error (go figure). Changed the PK increment value to 2 (was 1). Figured I'd jump ahead 1 record. Another test PM it ran OK. Reset increment value back to 1 and test another PM. Insert was good.

Before I do this on the production server can anyone see a reason why not? How will this effect other tables linked to the tblPMMessage PK with FK?

Like to know how this happened though! Cry


-------------
Don't eat the clown fish. They taste funny.


Posted By: WebWiz-Bruce
Date Posted: 06 May 2006 at 10:16am
I have never come across this type of issue before with SQL Server, it maybe worth checking MSDN and doing a search on Google for this type of issue with SQL Server.

Does sound like though, that in the server crash the server is not incrementing the ID fields to the next correct number.

If the way you mentioned worked, I would use that as it seems to be getting the server back to the correct seed increment. Although I would do a search on Google first to see if this is a common issue with SQL server and if there is a better workaround.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: supertramp
Date Posted: 06 May 2006 at 10:25am
It's a wired one. I was about to reset the increment on the server and low and behold everthing started working OK without any intervention from me.

I have been having trouble with the host. The host was that I was originally with was sold and all sites were migrated to the buyers servers. Been having SQL Server issues ever since. Anymore and I'll be over to you.

We'll see how it goes. By the way great work on the new version.

Cheers
Merv


-------------
Don't eat the clown fish. They taste funny.


Posted By: Skeever
Date Posted: 07 May 2006 at 7:24pm
Supertramp, i know what host you are talking about and to be totally honest i would get away from them asap...

I did so myself in january.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net