Duplicate statement 
Author Message
 Duplicate statement

Scott Ferret defined :
The DUPLICATE() statement has two states.  If you do a GET(file,0)
before calling DUPLICATE() it tests if the current record buffer would
fail on an ADD() call.  If no GET(file,0) is issued it tests if a PUT()
would fail.  The only one of these options that work with SQL systems
is the ADD test.  It also works when doing the PUT test for the primary
key.  The PUT test fails if you have a primary key and another unique
key and you are changing the component of the unique (but non-primary)
key.

Would it be better if I ;
1.) Run a PROP:SQL SELECT statement after saving key columns to save
variables and then NEXT statement to determine if any duplicates records
exists
or
2.) Trap the ErrorCode()40 and display my own message. Where would be the
best embed place to trap the error?

Any MSSQL 7.0 experts please advise!

Michael Elliott
Project Manager
Information Systems
Farm Credit Bank Of Texas
Phone:  (512) 465-0721
Pager:  (888) 323-6220



Mon, 30 Dec 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Duplicate label error - no duplicate!

2. case statement flipflop statement

3. difference if statement with case statement?

4. Switch statement with nested If statement

5. Unexpected STATEMENT FUNCTION statement

6. Minor bug - Duplicate Key Bindings

7. duplicate messages

8. How to replace many duplicate lines with one

9. Adding to a table with duplicates

10. Remove duplicate lines by testing of a field

11. newbie question: duplicate fields problem

12. delete duplicate entries in a file

 

 
Powered by phpBB® Forum Software