How about something like the form being accidently submitted twice c/o a JS
submit??

Stephen

----- Original Message -----
From: "Vance Duke" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, October 01, 2002 6:20 PM
Subject: CF Engine Posting to SQL TWICE


> Ok, I have been doing CF now for over 5 years and I have never seen this
> happen before and would like a fresh pair of eyes.
>
> Form submits Category and Placement.  Action page run the queries and
> then stops.  The debug information shows the queries and the information
> inserted only 1 time.  But the database, received 2 rows of the exact
> same data.  A SQL Trace shows the queries running 2 times as if they
> were in a loop, approx 20 ms apart.
>
> The code reads:
> <cfquery name="Renumber" datasource="#DSN#">
>    update ArticleCategory
>    set Placement = Placement+1
>    where Placement >= '#Placement#'
> </cfquery>
>
> <cfquery name="InsertArticleCategory" datasource="#DSN#">
>    insert into ArticleCategory(ArticleCategory, Placement)
>    values('#form.ArticleCategory#', '#form.Placement#')
> </cfquery>
>
> The debug shows:
> Renumber (Records=0, Time=0ms)
> SQL =
> update ArticleCategory
> set Placement = Placement+1
> where Placement >= '1'
>
> InsertArticleCategory (Records=0, Time=10ms)
> SQL =
> insert into ArticleCategory(ArticleCategory, Placement)
> values('test3', '1')
>
> But the Database shows:
> ID      Category    Placement
> 18 test3     2
> 19 test3     1
>
> It even renumber the first entry correctly by setting the
> placement=placement+1
>
> The code is only running once.  Why is the CF engine processing it
> twice.  In addition, this does not happen 100% of the time.  Rather, it
> is about 50-60% of the time.
>
> If I run the debug queries in Query Analyzer, it only does the operation
> 1 time.  Therefore I am pointing at the CF engine.
>
> We are running CF 5 on Win2k SP 2, IIS.
>
> Any help would be appreciated.
>
>
> 
______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to