Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert statement creating duplicate records?

Status
Not open for further replies.

TechDude

Programmer
Jul 20, 2000
62
US
Hi all,

I have a cf app that I created many moons ago which seems to have begun misbehaving. The app was working fine for several months. For some reason, when I execute a cfquery with an insert statement, it creates two records where it should only create one. None of the code has changed that I know of. The DB is Access. I tried deleting the datasource and re-creating it to no avail. Has anyone else experienced this?

thanks,

-Chris
Chris Sorel
chris@exnihilo.com
Remember, If you continue to do what you have always done,

you will continue to get what you have always gotten.
 
maybe you should post the code (at least, the relevant parts of it) along with your question, so that we can help more efficiently
 
This is the code....

<cfif parameterexists(form.add)>
<cfquery name=&quot;insert_services&quot;
datasource=&quot;bms_faq&quot;
dbtype=&quot;ODBC&quot;>
INSERT INTO Services (service,visible)
VALUES('#form.add_serv#',0)
</cfquery>
</cfif>
<cflocation url=&quot;edit_services.cfm&quot; >


Chris Sorel
chris@exnihilo.com
Remember, If you continue to do what you have always done,

you will continue to get what you have always gotten.
 
I would look for the possibility that your form is being submitted twice. Just a thought. Had network congestion lately? Or new users? Added any JavaScript to the front end web forms? Just kind of thinking out loud here, but that's what I'd look for. John Hoarty
jhoarty@quickestore.com
 
Thanks All,

Quick update,

I upgraded from 4.5.0.0 to 4.5.1 sp2. This seems to have fixed the problem.
Chris Sorel
chris@exnihilo.com
Remember, If you continue to do what you have always done,

you will continue to get what you have always gotten.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top