Access duplicates

This is a discussion on "Access duplicates" within the Databases section. This forum, and the thread "Access duplicates are both part of the Program Your Website category.



 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > Databases

Notices


Closed Thread
 
LinkBack Thread Tools
  #1  
Old Oct 8th, 2003, 21:00
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
Access duplicates

Has anyone had problems with access adding new records twice (creating a duplicate) when using INSERT INTO from ASP?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!

  #2  
Old Oct 8th, 2003, 22:11
Reputable Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
Its not a problem with refreshing the page and re-executing the code is it?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #3  
Old Oct 9th, 2003, 07:12
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
I thought about that, especially as it's not consistent. Sometimes a single entry, sometimes 2. Still trying to test that.

I know Access has some funky quirks and thought maybe this was just one of those.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #4  
Old Oct 9th, 2003, 12:55
Reputable Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 158
Thanks: 0
Thanked 0 Times in 0 Posts
Stab in the dark.. Not anything to do with a double click on the submit button? I.e., code being executed before any document output, nothing happens, person clicks again?

u2o
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #5  
Old Oct 9th, 2003, 20:00
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
OK, checked for double submit/refresh being the cause and that's not what's causing it. Switched from a DSN to DSN-less connection, didn't affect it.

Code's pretty standard:

Code: Select all
set con = server.CreateObject("ADODB.Connection")

	con.Open "Driver={Microsoft Access Driver (*.mdb)};" & _ 
                   "Dbq=" & server.mappath("data/xxxx.mdb") & ";" & _
                   "Uid=Admin;" & _
                   "Pwd=;"


SQL= "INSERT INTO tblMailingList(Name,Email,Address,City,ClosestCity,State,Zip,Phone,Status,Age,Sex,entryDate) VALUES ('" & Name & "','" & Email & "','" & Address & "','" & City & "','" & ClosestCity & "','" & State & "','" & Zip & "','" & Phone & "','" & Status & "','" & Age & "','" & Sex & "','" & date & " " & time & "')"
set rs = con.Execute(SQL,,1)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #6  
Old Oct 9th, 2003, 20:36
Reputable Member
Join Date: Sep 2003
Location: USA
Posts: 112
Thanks: 0
Thanked 0 Times in 0 Posts
I don't know if this has anything to do with your dual entry problem, but when I do an action query I don't set rs=conn.execute SQL

I just type conn.execute SQL

other than that, I don't know.

jakyra
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #7  
Old Oct 9th, 2003, 21:04
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
Yeah, I saw that he'd put it in that way and changed it to just con.execute. Still making doubles. I'm wondering if the hosting company (never use DellHost btw, they suck) has an old version of the Jet Engine installed.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #8  
Old Oct 10th, 2003, 04:24
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
Well, I gave up . I ended up adding some code to an admin page to remove all the duplicates when they pull up the table contents.

Now I remember why I like SQL Server better.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Closed Thread

Tags
access, duplicates

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Portfolio Site Trouble! Duplicates of One Image taaaylor Flash & Multimedia Forum 5 Jun 26th, 2007 23:50
ASP Multi users Access to Microsoft Access ish Classic ASP 0 Apr 26th, 2007 20:05
Access cheataweb Databases 4 Mar 21st, 2007 18:42
ASP to ACCESS ntgcmlfu Classic ASP 16 Apr 18th, 2006 03:33
Need help please...ASP and Access DB newbie44 Classic ASP 13 Sep 19th, 2005 22:02


All times are GMT. The time now is 05:47.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42