Web Wiz - Green Windows Web Hosting - Celebrating 25 Years!

  New Posts New Posts RSS Feed - Help - error sending PM
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Help - error sending PM

 Post Reply Post Reply
Author
supertramp View Drop Down
Newbie
Newbie


Joined: 01 May 2006
Location: Australia
Status: Offline
Points: 25
Post Options Post Options   Thanks (0) Thanks(0)   Quote supertramp Quote  Post ReplyReply Direct Link To This Post Topic: Help - error sending PM
    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.

Edited by supertramp - 06 May 2006 at 7:44am
Back to Top
supertramp View Drop Down
Newbie
Newbie


Joined: 01 May 2006
Location: Australia
Status: Offline
Points: 25
Post Options Post Options   Thanks (0) Thanks(0)   Quote supertramp Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
supertramp View Drop Down
Newbie
Newbie


Joined: 01 May 2006
Location: Australia
Status: Offline
Points: 25
Post Options Post Options   Thanks (0) Thanks(0)   Quote supertramp Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Skeever View Drop Down
Newbie
Newbie


Joined: 25 February 2003
Location: Norway
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote Skeever Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.