duplicate records inserted into access DB 
Author Message
 duplicate records inserted into access DB

I am using an "INSERT INTO" statement from VBScript to a MS Access database
that is inserting duplicate rows:

INSERT INTO order_detail ( orderid, productid, description, unit_of_measure,
color_misc, qty, price, entry_date, small_desc ) values (54878112, 20, 'Book
1', '320 pps', 'n/a', 1, 13.95, '1/4/01 5:44:21 PM', 'Healthy Hair & Nails')

When I do a select on the order_detail table, I see this:

176 54878112 20 Book 1320 pps n/a 1 13.95 1/4/01 5:44:21 PM Healthy Hair &
Nails
177 54878112 20 Book 1320 pps n/a 1 13.95 1/4/01 5:44:21 PM Healthy Hair &
Nails

When I do a response.write to show the sql statement, I notice nothing
wrong. Additionally, the insert is not done in a loop, etc. It is merely one
sql statement that does TWO inserts. Is this a BUG?

The webserver is IIS 4.0, the table is Access2000 SR1. I can send more
detailed code samples to anyone who might know what causes this problem.

Thanks in advance,
Jeff Watts-Roy



Tue, 24 Jun 2003 12:23:20 GMT  
 duplicate records inserted into access DB
Looks like it may have been due to an implicit update to an autonumber field
(my error). This is a noted issue and once I found the documentation in MSDN
I checked to see if this is what was going on.
Jeff Watts-Roy


Quote:
> I am using an "INSERT INTO" statement from vbscript to a MS Access
database
> that is inserting duplicate rows:

> INSERT INTO order_detail ( orderid, productid, description,
unit_of_measure,
> color_misc, qty, price, entry_date, small_desc ) values (54878112, 20,
'Book
> 1', '320 pps', 'n/a', 1, 13.95, '1/4/01 5:44:21 PM', 'Healthy Hair &
Nails')

> When I do a select on the order_detail table, I see this:

> 176 54878112 20 Book 1320 pps n/a 1 13.95 1/4/01 5:44:21 PM Healthy Hair &
> Nails
> 177 54878112 20 Book 1320 pps n/a 1 13.95 1/4/01 5:44:21 PM Healthy Hair &
> Nails

> When I do a response.write to show the sql statement, I notice nothing
> wrong. Additionally, the insert is not done in a loop, etc. It is merely
one
> sql statement that does TWO inserts. Is this a BUG?

> The webserver is IIS 4.0, the table is Access2000 SR1. I can send more
> detailed code samples to anyone who might know what causes this problem.

> Thanks in advance,
> Jeff Watts-Roy




Tue, 24 Jun 2003 15:39:12 GMT  
 duplicate records inserted into access DB
Just for everyone's edification. It is not the autonumber thing. It is the
fact that I am submitting a form using an <INPUT TYPE="Image"> and it
submits the form twice! My image input calls a javascript function that
submits the form. It was submitting twice if I the user clicks enter while
any of the form elements had focus.


Quote:
> Looks like it may have been due to an implicit update to an autonumber
field
> (my error). This is a noted issue and once I found the documentation in
MSDN
> I checked to see if this is what was going on.
> Jeff Watts-Roy



> > I am using an "INSERT INTO" statement from vbscript to a MS Access
> database
> > that is inserting duplicate rows:

> > INSERT INTO order_detail ( orderid, productid, description,
> unit_of_measure,
> > color_misc, qty, price, entry_date, small_desc ) values (54878112, 20,
> 'Book
> > 1', '320 pps', 'n/a', 1, 13.95, '1/4/01 5:44:21 PM', 'Healthy Hair &
> Nails')

> > When I do a select on the order_detail table, I see this:

> > 176 54878112 20 Book 1320 pps n/a 1 13.95 1/4/01 5:44:21 PM Healthy Hair
&
> > Nails
> > 177 54878112 20 Book 1320 pps n/a 1 13.95 1/4/01 5:44:21 PM Healthy Hair
&
> > Nails

> > When I do a response.write to show the sql statement, I notice nothing
> > wrong. Additionally, the insert is not done in a loop, etc. It is merely
> one
> > sql statement that does TWO inserts. Is this a BUG?

> > The webserver is IIS 4.0, the table is Access2000 SR1. I can send more
> > detailed code samples to anyone who might know what causes this problem.

> > Thanks in advance,
> > Jeff Watts-Roy




Wed, 25 Jun 2003 00:36:45 GMT  
 duplicate records inserted into access DB
If you're on an ASP page, it's possible the query is being run twice even
though it's not inside a loop or anything just because of the way ASP
processes.  I'd look at all my client-side and server-side stuff and do a
mental walk-through to be sure of what is executing when, and in this case,
how often.
cb


Quote:
> I am using an "INSERT INTO" statement from vbscript to a MS Access
database
> that is inserting duplicate rows:

> INSERT INTO order_detail ( orderid, productid, description,
unit_of_measure,
> color_misc, qty, price, entry_date, small_desc ) values (54878112, 20,
'Book
> 1', '320 pps', 'n/a', 1, 13.95, '1/4/01 5:44:21 PM', 'Healthy Hair &
Nails')

> When I do a select on the order_detail table, I see this:

> 176 54878112 20 Book 1320 pps n/a 1 13.95 1/4/01 5:44:21 PM Healthy Hair &
> Nails
> 177 54878112 20 Book 1320 pps n/a 1 13.95 1/4/01 5:44:21 PM Healthy Hair &
> Nails

> When I do a response.write to show the sql statement, I notice nothing
> wrong. Additionally, the insert is not done in a loop, etc. It is merely
one
> sql statement that does TWO inserts. Is this a BUG?

> The webserver is IIS 4.0, the table is Access2000 SR1. I can send more
> detailed code samples to anyone who might know what causes this problem.

> Thanks in advance,
> Jeff Watts-Roy




Sat, 19 Jul 2003 06:30:59 GMT  
 duplicate records inserted into access DB
yes, this was the case--my input type (an image) was doing a double submit
in conjunction with my javascript form.submit.

Thanks,
Jeff Watts-Roy


Quote:
> If you're on an ASP page, it's possible the query is being run twice even
> though it's not inside a loop or anything just because of the way ASP
> processes.  I'd look at all my client-side and server-side stuff and do a
> mental walk-through to be sure of what is executing when, and in this
case,
> how often.
> cb



> > I am using an "INSERT INTO" statement from vbscript to a MS Access
> database
> > that is inserting duplicate rows:

> > INSERT INTO order_detail ( orderid, productid, description,
> unit_of_measure,
> > color_misc, qty, price, entry_date, small_desc ) values (54878112, 20,
> 'Book
> > 1', '320 pps', 'n/a', 1, 13.95, '1/4/01 5:44:21 PM', 'Healthy Hair &
> Nails')

> > When I do a select on the order_detail table, I see this:

> > 176 54878112 20 Book 1320 pps n/a 1 13.95 1/4/01 5:44:21 PM Healthy Hair
&
> > Nails
> > 177 54878112 20 Book 1320 pps n/a 1 13.95 1/4/01 5:44:21 PM Healthy Hair
&
> > Nails

> > When I do a response.write to show the sql statement, I notice nothing
> > wrong. Additionally, the insert is not done in a loop, etc. It is merely
> one
> > sql statement that does TWO inserts. Is this a BUG?

> > The webserver is IIS 4.0, the table is Access2000 SR1. I can send more
> > detailed code samples to anyone who might know what causes this problem.

> > Thanks in advance,
> > Jeff Watts-Roy




Mon, 28 Jul 2003 10:41:33 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. duplicate records inserted into access DB

2. I am getting duplicate records, I mean everything is duplicate even Access record number

3. STUMPED: Inserting DB Record w/ ASP and Access

4. How to INSERT with duplicate records into Access 2000

5. Inserting Records Into an Access DB

6. Inserting a Record into a MS Access DB While Inside a Loop

7. Example of inserting record to Access DB using RDS

8. Inserting records from access db into MSSQL

9. Inserting Duplicate Records in ADO...

10. Howto skip only duplicate row while inserting bulk number of records

11. *** Please help with duplicating records in a DB

12. INSERT INTO Access DB from SQL DB-HELP!!

 

 
Powered by phpBB® Forum Software