> I've started to get the following error in my app:
>
> ---
> [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert duplicate key
> row in object 'CDATA' with unique index 'id1'.

As a follow up to my original post, I have found out a great deal more about
the problem, though I still don't have a solution.  Here's a post I just
made to the Forums about it.

Common CF-Talk, don't fail me now....

--
I've having the same error. Here's what info I can contribute... I am able
to reproduce the error intermittantly using IE 5.5, but not with Netscape
4.7 (same client machine). I also have discovered a bit of code which I can
comment out that makes the problem completely do away, but I have no idea
why.

The particular place in my app where this error occurs is when a user is
logging into my app. After the login is authenticated via a CFSTOREDPROC, a
whole slew of client vars are set, including one which is a WDDX packet (in
case that matters).

After that, a quick CFIF test is done on the resultsets of the STOREDPROC.
No client vars are accessed during the execution of this CFIF, nor inside it
if it returns true. If the CFIF does return true, an email is generated
using CFMAIL and more of the STOREDPROC resultsets.

That CFIF is the code I can comment out to make it all work. I also tried
commenting out the CFMAIL (so that nothing happened if the CFIF returns
true), and I can reproduce the error.

Also, if I replace the CFIF with a CFOUTPUT which output the same var called
in the CFIF, I can also generate the error.

But yes, there's more! After the CFIF statement, the user is CFLOCATIONed to
the entrance page to the app. The CFLOCATION does use ADDTOKEN="Yes", but
deleting that does not prevent the error from happening.

Funny thing is, that the error is not happening on the page with the CFIF,
it's happening on the entry page to the app. Something in the login template
(cfm page 1) is causing the entry page (cfm page 2) to fail.

The offending sequence seems to be (1) call a storedproc (it returns several
recordsets) (2) set a bunch or client vars using that data (3) call data
from the storedproc recordset again. (4) CFLOCATION to another page.

One other note here in ramblings... When you view the souce of the page, it
contains the error, then a bunch of raw HTML headers (which should not show
in the browser), and then the CFM page, correctly executed!

So, my conclusion is... Well, I dunno really, but I can reproduce the error,
and I *can* make it go away (in my app). I just don't know why.

Also, I wonder why it's only happening in IE,a nd not NS? Maybe something to
do with the way each browser executes the CFLOCATION? Maybe the way each
stores the CFID/CFTOKEN cookies?

Anyone have any ideas?

-Cameron

--------------------
Cameron Childress
ElliptIQ Inc.
p.770.460.7277.232
f.770.460.0963

------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]

Reply via email to