Coldfusion unexplainable duplicate issues, cannot figure this out!

    So I've been fighting this for days.  I dont have the slightest idea where I can go from here.  I have your standard coldfusion insert queries set up to insert new data into the database.  Something along the lines of:
Select * from table where tableuniqueID = Form.UniqueID  
Cfif databasecheck.recordcount EQ 0, then insert new row with form.uniqueID as the uniqueID.  Well recently, its been throwing the generic Violation of PRIMARY KEY constraint 'PK__OLMS_Dat__9C04DA075F0A3F61'. Cannot insert duplicate key in object 'dbo.table'.
I dont understand that in the slightest, the only way it inserts is if the query right above it is defined and equal to 0 recordcount.
I did some tooling around, and found someone suggesting to insert into my SQL "IF NOT EXISTS" to have SQL do the actual check to see if data exists.  Well we put that in place, and just recently, ANOTHER duplicate happened, same error, cannot insert duplicate showing the new SQL structure.
This is beyond me.  I have two statements checking to see if it exists and, yet, Coldfusion still tries to execute a database insert.  What is going on??  Any ideas?  You would figure this would be the basics.

Hello.  I know it's been awhile but did you figure this out?  I have a very similar thing happening. Something along the lines of
INSERT INTO WorkSheet (CODE_KEY)
SELECT TOP (1) EI.CODE_KEY
FROM EmpInfo AS EI  LEFT OUTER JOIN
WorkSheet AS WS ON WS.CODE_KEY = EI.CODE_KEY
WHERE (EI.CODE_KEY = 'param1') AND (WS.CODE_KEY IS NULL)
where the field "CODE_KEY" is a the primary key in SQL Server 2008.  This is similar to what you're doing except that the check for an existing value happens as part of the insert query.  Just like you every once in awhile I get the "[Macromedia][SQLServer JDBC Driver][SQLServer]Violation of PRIMARY KEY constraint" error. I'd say I get one a week.
The only hint I have is that there is an insert that succeeds.  This insert happens at the same time as the one that fails. That seems that the code is executing twice at the exact same time which seems impossible. In fact it seems to me that a second query would have to happen so fast that the join shows no value (otherwise I'd get records updated = 0 rather than the error) but then the first (successful) record is created prior to the 2nd one being inserted.

Similar Messages

  • Cannot figure this out

    good evening
    can anyone out there tell me why, when i am in another app, say Imovie, and i want to import from iphoto6, there are only certain albums listed?
    how do you view all your albums to import from iphoto? all i see are some albums, and roll numbers, after i click on a year.
    this has been making me nuts for awhile now, and i cannot find anything listed as to how to properly do this.
    thanks for any help

    What can't you figure out ? If you've rented a film on your iPad then it should have downloaded into its Videos app, and you should be able to play it from there - is the film in the Videos app ?

  • Cannot Connect , Cannot figure this out Please help

    I have a Mac Book Pro 15 inch purchased in January 09. I have firewall turned on and added iChat as essential service. I can text chat but cannot get the video to work. I live on Maui. I have DSL. I did the speed test which came back as 3.1MB download and 376 upload. (ouch). I have changed the quicktime streaming speed to 1.5. I have changed the iChat bandwidth to 500 (more than my upload). I receive a connection error anytime I send or receive a video chat. Is the problem with the upload speed?

    Aloha Ralph,
    Wireless connection to DSL modem.
    I have not nor know how to open the ports that iChat needs to route. (This may be the issue)
    Thanks for telling me how to find the old log to post. Here it is:
    Date/Time: 2009-03-02 18:52:31.536 -1000
    OS Version: 10.5.6 (Build 9G55)
    Report Version: 4
    iChat Connection Log:
    2009-03-02 18:52:03 -1000: AVChat started with ID 2221088225.
    2009-03-02 18:52:03 -1000: [email protected]: State change from AVChatNoState to AVChatStateWaiting.
    2009-03-02 18:52:03 -1000: 0x18a7adb0: State change from AVChatNoState to AVChatStateInvited.
    2009-03-02 18:52:19 -1000: 0x18a7adb0: State change from AVChatStateInvited to AVChatStateConnecting.
    2009-03-02 18:52:19 -1000: [email protected]: State change from AVChatStateWaiting to AVChatStateConnecting.
    2009-03-02 18:52:27 -1000: 0x18a7adb0: State change from AVChatStateConnecting to AVChatStateEnded.
    2009-03-02 18:52:27 -1000: 0x18a7adb0: Error -7 (0x18a7adb0 cancelled the connection.)
    2009-03-02 18:52:27 -1000: [email protected]: State change from AVChatStateConnecting to AVChatStateEnded.
    2009-03-02 18:52:27 -1000: [email protected]: Error -7 (0x18a7adb0 cancelled the connection.)
    Video Conference Error Report:
    64.338046 @SIP/SIP.c:2719 type=4 (900A0015/0)
    [SIPConnectIPPort failed]
    64.338592 @SIP/SIP.c:2719 type=4 (900A002D/0)
    [SIPConnectIPPort failed]
    Video Conference Support Report:
    5.108075 @Video Conference/VCInitiateConference.m:1584 type=2 (00000000/0)
    [Connection Data for call id: 1 returns 1
    40.915710 @Video Conference/VCInitiateConference.m:1584 type=2 (00000000/0)
    [Connection Data for call id: 2 returns 1
    56.318899 @Video Conference/VCInitiateConference.m:1599 type=2 (00000000/0)
    [Prepare Connection With Remote Data - remote VCConnectionData: 1, local VCConnectionData: 1
    56.322831 @Video Conference/VCInitiateConference.m:1703 type=2 (00000000/0)
    [Initiate Conference To User: u0 with Remote VCConnectionData: 1 with Local Connection Data: 1 conferenceSettings: 1]
    62.337224 @SIP/Transport.c:2362 type=1 (00000000/0)
    [INVITE sip:user@rip:16402 SIP/2.0
    Via: SIP/2.0/UDP lip:16402;branch=z9hG4bK177457862f830ef1
    Max-Forwards: 70
    To: "u0" <sip:user@rip:16402>
    From: "0" <sip:user@lip:16402>;tag=1307095421
    Call-ID: 16f33de0-07af-11de-bf1e-929ebee44012@lip
    CSeq: 1 INVITE
    Contact: <sip:user@lip:16402>;isfocus
    User-Agent: Viceroy 1.3
    Content-Type: application/sdp
    Content-Length: 733
    v=0
    o=Dana 0 0 IN IP4 lip
    s=0
    c=IN IP4 lip
    b=AS:2147483647
    t=0 0
    a=hwi:17412:2:2400
    a=iChatEncryption:YES
    a=bandwidthDetection:YES
    m=audio 16402 RTP/AVP 110 121 12 3 0
    a=rtcp:16402
    a=rtpmap:121 speex/16000
    a=rtpmap:122 speex/8000
    a=rtpmap:113 X-AAC_LD/44100
    a=rtpmap:110 X-AAC_LD/22050
    a=rtpmap:3 GSM/8000
    a=rtpmap:0 PCMU/8000
    a=rtpID:218866866
    m=video 16402 RTP/AVP 123 126 34
    a=rtcp:16402
    a=rtpmap:123 H264/90000
    a=rtpmap:126 X-H264/90000
    a=rtpmap:34 H263/90000
    a=fmtp:34 imagesize 1 rules 30:352:288
    a=framerate:30
    a=RTCP:AUDIO 16402 VIDEO 16402
    a=fmtp:126 imagesize 0 rules 20:640:480:640:480:20
    a=fmtp:123 imagesize 0 rules 20:640:480:640:480:20
    a=rtpID:2833956586
    62.838237 @SIP/Transport.c:2362 type=1 (00000000/0)
    [INVITE sip:user@rip:16402 SIP/2.0
    Via: SIP/2.0/UDP lip:16402;branch=z9hG4bK177457862f830ef1
    Max-Forwards: 70
    To: "u0" <sip:user@rip:16402>
    From: "0" <sip:user@lip:16402>;tag=1307095421
    Call-ID: 16f33de0-07af-11de-bf1e-929ebee44012@lip
    CSeq: 1 INVITE
    Contact: <sip:user@lip:16402>;isfocus
    User-Agent: Viceroy 1.3
    Content-Type: application/sdp
    Content-Length: 733
    v=0
    o=Dana 0 0 IN IP4 lip
    s=0
    c=IN IP4 lip
    b=AS:2147483647
    t=0 0
    a=hwi:17412:2:2400
    a=iChatEncryption:YES
    a=bandwidthDetection:YES
    m=audio 16402 RTP/AVP 110 121 12 3 0
    a=rtcp:16402
    a=rtpmap:121 speex/16000
    a=rtpmap:122 speex/8000
    a=rtpmap:113 X-AAC_LD/44100
    a=rtpmap:110 X-AAC_LD/22050
    a=rtpmap:3 GSM/8000
    a=rtpmap:0 PCMU/8000
    a=rtpID:218866866
    m=video 16402 RTP/AVP 123 126 34
    a=rtcp:16402
    a=rtpmap:123 H264/90000
    a=rtpmap:126 X-H264/90000
    a=rtpmap:34 H263/90000
    a=fmtp:34 imagesize 1 rules 30:352:288
    a=framerate:30
    a=RTCP:AUDIO 16402 VIDEO 16402
    a=fmtp:126 imagesize 0 rules 20:640:480:640:480:20
    a=fmtp:123 imagesize 0 rules 20:640:480:640:480:20
    a=rtpID:2833956586
    63.838552 @SIP/Transport.c:2362 type=1 (00000000/0)
    [INVITE sip:user@rip:16402 SIP/2.0
    Via: SIP/2.0/UDP lip:16402;branch=z9hG4bK177457862f830ef1
    Max-Forwards: 70
    To: "u0" <sip:user@rip:16402>
    From: "0" <sip:user@lip:16402>;tag=1307095421
    Call-ID: 16f33de0-07af-11de-bf1e-929ebee44012@lip
    CSeq: 1 INVITE
    Contact: <sip:user@lip:16402>;isfocus
    User-Agent: Viceroy 1.3
    Content-Type: application/sdp
    Content-Length: 733
    v=0
    o=Dana 0 0 IN IP4 lip
    s=0
    c=IN IP4 lip
    b=AS:2147483647
    t=0 0
    a=hwi:17412:2:2400
    a=iChatEncryption:YES
    a=bandwidthDetection:YES
    m=audio 16402 RTP/AVP 110 121 12 3 0
    a=rtcp:16402
    a=rtpmap:121 speex/16000
    a=rtpmap:122 speex/8000
    a=rtpmap:113 X-AAC_LD/44100
    a=rtpmap:110 X-AAC_LD/22050
    a=rtpmap:3 GSM/8000
    a=rtpmap:0 PCMU/8000
    a=rtpID:218866866
    m=video 16402 RTP/AVP 123 126 34
    a=rtcp:16402
    a=rtpmap:123 H264/90000
    a=rtpmap:126 X-H264/90000
    a=rtpmap:34 H263/90000
    a=fmtp:34 imagesize 1 rules 30:352:288
    a=framerate:30
    a=RTCP:AUDIO 16402 VIDEO 16402
    a=fmtp:126 imagesize 0 rules 20:640:480:640:480:20
    a=fmtp:123 imagesize 0 rules 20:640:480:640:480:20
    a=rtpID:2833956586
    64.338521 @SIP/Transport.c:2362 type=1 (00000000/0)
    [INVITE sip:user@rip:16402 SIP/2.0
    Via: SIP/2.0/UDP sip:50862;branch=z9hG4bK6d331d5b79997f5c
    Max-Forwards: 70
    To: "u0" <sip:user@rip:16402>
    From: "0" <sip:user@lip:16402>;tag=1328308780
    Call-ID: 18249b6e-07af-11de-bf1e-933597634012@lip
    CSeq: 1 INVITE
    Contact: <sip:user@sip:50862>;isfocus
    User-Agent: Viceroy 1.3
    Content-Type: application/sdp
    Content-Length: 737
    v=0
    o=Dana 0 0 IN IP4 sip
    s=0
    c=IN IP4 sip
    b=AS:2147483647
    t=0 0
    a=hwi:17412:2:2400
    a=iChatEncryption:YES
    a=bandwidthDetection:YES
    m=audio 50862 RTP/AVP 110 121 12 3 0
    a=rtcp:50862
    a=rtpmap:121 speex/16000
    a=rtpmap:122 speex/8000
    a=rtpmap:113 X-AAC_LD/44100
    a=rtpmap:110 X-AAC_LD/22050
    a=rtpmap:3 GSM/8000
    a=rtpmap:0 PCMU/8000
    a=rtpID:218866866
    m=video 50862 RTP/AVP 123 126 34
    a=rtcp:50862
    a=rtpmap:123 H264/90000
    a=rtpmap:126 X-H264/90000
    a=rtpmap:34 H263/90000
    a=fmtp:34 imagesize 1 rules 30:352:288
    a=framerate:30
    a=RTCP:AUDIO 50862 VIDEO 50862
    a=fmtp:126 imagesize 0 rules 20:640:480:640:480:20
    a=fmtp:123 imagesize 0 rules 20:640:480:640:480:20
    a=rtpID:2833956586
    Video Conference User Report:
    0.000000 @:0 type=5 (00000000/16402)
    [Local SIP port]
    I look forward to your reply!
    Dana

  • HELP! I cannot figure this out, differences between 9i and 10g installation

    This is for class, and my instructor who obviously has a bad sense of humor has provided me with the following "good" link to get these answers:
    http://www.stanford.edu/dept/itss/docs/oracle/10g/nav/portal_1.htm
    Within the comparison document you create, include key differences such as, but not limited to:
    Any pre-configuration of the Operating System.
    Memory configuration consideration (both physical and logical).
    Naming conventions of the Global Database or System Identifier (SID).
    Online input screens within the Oracle Installer.
    Processes that run during the installation (i.e. port assignments, directories defined, etc.).
    Password configurations or assignments.
    Web Services created (is there one?).
    Any post-configuration of the Operating Ssystem.

    The current Oracle installation docs can be found at:
    http://docs.oracle.com.
    Use Oracle's docs and if you instructor has any questions tell him or her to contact me at the University of Washington.
    I spent a lot of time on the Stanford campus ... lots of great resources ... but Oracle docs should be found at ...oracle.com.

  • I Cannot Figure this out!  How Do I Lock a Track In Adobe Premiere Pro?

    Hi everyone!
    I'm from the Final Cut Pro world, getting acclimated to Adobe Premiere Pro and am wondering how do I lock a track on the timeline?  The audio and video are synced which is what I want, it's just one thing I want to change within the audio.  However, when I select and delete this one portion of the audio, it deletes the video as well.  This seems over complicated to perform.  Any help is much appreciated.  Thanks!

    Here you go.

  • HELP!!!! I cannot figure this out for the LIFE Of me and i'm going bonkers!!!

    I did an update on my phone today???? and now I cannot turn off vibrate on INCOMING txt messages. I even turn sound off, and the **** thing is jumping all over the place. It is annoying as heck when you're texting and someone txts you back and it's vibrating in your hand. HOW DO I TURN OFF THE VIBRATE SETTING on INCOMING txt MESSAGES on my new DROID RAZR M????? HELP ME!!!!!

    I don't care if you are male or female. I am so kissing you right now!!!! wow. THANK YOU!!!! you just made me love my phone again!!! yay! thank you soooo much!

  • How can I include a success message in a drag and drop interaction - I don't see this option in the Actions on success options, and cannot figure it out?

    How can I include a success message in a drag and drop interaction - I don't see this option in the Actions on success options, and cannot figure it out?

    I suspected you used the eye icon on the timeline to hide the message, but that one has no impact whatsoever on the published version. It is only meant to be used for editing reasons on the stage, to hide objects temporarily on a crowded stage. It is confusing, certainly in CP8 where for both instances the same eye icon is used. In previous versions the Properties panel had a checkbox for 'Show in Output', which was IMO much clearer than this eye icon. But of course, that is only my personal opinion.

  • I'm having issues loading Youtube on my MacBook Pro for about a week now.  I'm not sure if this is because of my computer or internet but my sister's PC loads Youtube completely fine.  Can someone help me figure this out?

    I'm having issues loading Youtube on my MacBook Pro for about a week now.  I'm not sure if this is because of my computer or internet but my sister's PC loads Youtube completely fine.  Can someone help me figure this out?

    Hi, I had been having the same problem for over a week, but both my window's HP and my 2011 macbook pro barely could load youtube.  What kind of router you have?  I was using a belkin play router that was only 8 months old, switched to a new AirPort Extreme Base Station and now everything works perfect.

  • I recently purchased a used imac with os 10.6 The problem I am having the admin in accounts in system preferences I would like to change so I can download some items I have tried different things  to do this but I cannot figure it out. thanks

    I recently purchased a used imac with os 10.6 The problem I am having the admin in accounts in system preferences I would like to change so I can download some items I have tried different things  to do this but I cannot figure it out. thanks in advance.

    Thats the problem I bought it from a very large thrift store. i went back asked the person where I bought the computer he said we can not give you the password. I thought buying it there was a good idea because not only was it a nice deal but it was like I was maknig a donation. I know that i messed up because i do not have the installation disk. I bought it without thinking. Until recently I was still using an old G4 9.0 os. I guess you can say I have been out of the loop for a while.

  • Even a hired Flash Technician couldn't figure this out! (button/AS2/link issue)

    I bought a template online, same as half the people on here needing help. I managed most modifications myself and even some swag. But one of the links entitled "more" is correct on the first page but then in AS2 appears to be a duplicate on the 4th page. I want the one on the 4th page to link to an imported .png file. When you click a veiw more link an animation slides the page that is linked open. There are 8 working pages in the site 5 of which seem to be the core pages. I want to add a ninth page that is actually a .png file and have the "more" link link to it and animate to it. Can anyone help me figure this out. I've put in over 230 hours on this template and am feeling like it'll never get finished!!

    You should hire another Flash designer to help you figure it out... either that or go back to where you bought the template and see if they offer editing services for a fee.

  • How do I use the product formula in Numbers?  I want to calculate the product of three numbers?  In Excel it is simply calculated as '=b4*b5*b6.'  How do I do this in Numbers?  I cannot figure it out, and I can't type in the Excel type formula.

    Can someone tell mr the steps to write a formula to calculate a product of the cells?  I cannot figure it out.

    You double click the cell the product is to be placed in.
    Then click the "=" from the little bar that appears above the numeric keyboard.
    Then click cell B4.  That should place its reference in the bar to the right of the equal sign.
    Then click the "x" from the function guide next to the numeric keypad.
    Then click cell B5.
    Then click the "x".
    Then click cell B6.
    Finally click the green check mark on the right.  Done.

  • I am trying to cancel my monthly subscription to adobe reader...it is not user friendly and I cannot figure it out.

    I Am trying to cancel my monthly subscription but this site is not user friendly and I cannot figure it out!  Help!

    There's no monthly subscription to Adobe Reader. It's a free product that doesn't require subscription or payment of any kind.
    What exactly do you have a subscription for?

  • Hello  I have a problem with Mac Pro, iPhoto does not want to stay open and close as I can figure this out?  thanks

    Hello  I have a problem with Mac Pro, iPhoto does not want to stay open and close as I can figure this out?  thanks

    Refer below link once
    App doesn’t open | Progress wheel spins continually

  • So i have an apple ipod touch 1st generation and it is not charging! It shows the charging sign but its taking a really long time to charge. Ive had it charging for at least 3 hours and it still says under 20% so can someone help me figure this out??

    So i have an apple ipod touch 1st generation and it is not charging! It shows the charging sign but its taking a really long time to charge. Ive had it charging for at least 3 hours and it still says under 20% so can someone help me figure this out??

    Not Charge
    - See:      
    iPod touch: Hardware troubleshooting
    iPhone and iPod touch: Charging the battery
    - Try another cable.
    - Try another charging source
    - Inspect the dock connector on the iPod for bent or missing contacts, foreign material, corroded contacts, broken, missing or cracked plastic.
    - Make an appointment at the Genius Bar of an Apple store.
      Apple Retail Store - Genius Bar 

  • WHY!!!!! I can't figure this out

    Why my girlfriend is getting the message that her "remote IP address is invalid" I can't seem to understand or figure this out...

    They should turn off Internet Sharing in System Preferences > Sharing if it is On
    Are either of you running Internet Sharing? If so, turn it off.
    They should not be letting Parallels connect using the Mac's IP if they run Parallels.
    Do either of you use Parallels Desktop or VMWare Fusion to run windows on you Mac? If so, turn off their access to the internet in their settings or preferences.
    They should not be connected to the Router via wireless (Airport card) and Wired (Ethernet) at the same time.
    Are either of you connected to both Ethernet port and Airport wireless at the same time. If so, disable one of the network configurations. Either unplug the cable or turn Airport off.
    They should not have two DHCP servers in a modem and router on their LAN.
    How are your router and modem configured. If they are both distributing IP addresses, then you need to either set your router to bridge mode or set the modem to assign just one IP address. I don't know what hardware you have, so I can't begin to tell you how to configure either. Unless it is an Airport Base Station, most modems and routers are configured through a Web interface. Airport Utility will let you configure the Airport Base Station.

Maybe you are looking for

  • Error: You cannot login because an error occurred while retrieving the login URL. (WW

    Situation is this.. was using 8.1.6 EE and Oracle Portal.. was able to get the Oracle Portal page up and after a while the application died.. this happened numerous times. Found in one of these forums that a bug existed (UTL_HTTP) and recommended goi

  • Cannot Scan from Scanner

    I cannot scan documents from my scanner into Adobe Acrobat Pro 9.3.2.  The process only works once.  Then if I run a repair of Adobe Acrobat, I scan do another scan, and so on.  Just one scan per repair.  The error is "The program can't start because

  • Leopard to Leopard Network Shares Not Working

    I see numerous threads about Leopard shares and Windows. However, I do not see any threads about issues with Leopard to Leopard shares. I have three Macs in the house and one Windows XP box. The Windows XP box works perfectly fine seeing and sharing

  • How to use two libraries on two different pc

    I have a MAcBook Pro and a Windows XP Pro with both itunes 7 installed on each. How can I share my songs with both libraries without resetting the ipod. We hav three ipod (2-nano (2 Gigs) and one video 60 gigs.) In my family we are three who sharing

  • Flash Player Crashes everywhere

    I'm using windows 7 64-bit flash player 10.1 (latest version) I've tried on Internet Explorer, Firefox, and Chrome I'm trying to load video streams on websites such as ustream.tv and justin.tv but flash crashes immediately I'm not sure how new this f