no error when inserting duplicates into Access 
Author Message
 no error when inserting duplicates into Access

I am trying to get an error msg. when using VB to insert a duplicate record
 into an Access table.  I have composite key fields defined in Access.  If
I try to enter a duplicate record manually in the Access table I get an
error.  If I try using VB to enter the duplicate record it just ignores the
duplicate and doesn't give me an error msg.   I'm using SQL stmts to import
and sort a text file and then to insert the records into an Access DB.


Sun, 20 Jan 2002 03:00:00 GMT  
 no error when inserting duplicates into Access
Somehow, you're failing to trap the generated errors.  Please post some of your
relevant code so that we can see where the oversight is.

-Curtis Spendlove
-Solstice Software

Quote:
>I am trying to get an error msg. when using VB to insert a duplicate record
> into an Access table.  I have composite key fields defined in Access.  If
>I try to enter a duplicate record manually in the Access table I get an
>error.  If I try using VB to enter the duplicate record it just ignores the
>duplicate and doesn't give me an error msg.   I'm using SQL stmts to import
>and sort a text file and then to insert the records into an Access DB.



Sun, 20 Jan 2002 03:00:00 GMT  
 no error when inserting duplicates into Access
Try this:

   MDB.Execute SQL,dbFailOnError

HTH

On 4 Aug 1999 09:11:29 -0800, "Mike Ratch"

Quote:

>I am trying to get an error msg. when using VB to insert a duplicate record
> into an Access table.  I have composite key fields defined in Access.  If
>I try to enter a duplicate record manually in the Access table I get an
>error.  If I try using VB to enter the duplicate record it just ignores the
>duplicate and doesn't give me an error msg.   I'm using SQL stmts to import
>and sort a text file and then to insert the records into an Access DB.



Mon, 21 Jan 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. rdo duplicate insert error

2. Error: Inserting duplicate rows in Oracle.

3. duplicate records inserted into access DB

4. VB & Access: duplicate inserts on unique key

5. duplicate records inserted into access DB

6. How to INSERT with duplicate records into Access 2000

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

8. VB error trapping of duplicates in indexed Access database

9. After inserting 40 sub reports the sections is getting duplicated

10. Skip duplicate values in INSERT

11. Skip duplicate values in INSERT

12. INSERT INTO skipping duplicates

 

 
Powered by phpBB® Forum Software