How do I detect a duplicate record before insert i

Results 1 to 2 of 2

Thread: How do I detect a duplicate record before insert i

  1. #1
    Noel Ramirez Guest

    Default How do I detect a duplicate record before insert i

    I&#039m new to Visual Interdev 6 and SQL Server 7. I wish to know how I could detect whether a record is already in a table. I am trying to use the Find method for recordsets.<BR>Does anybody help me?<BR>nramirez@cognosist.com <BR>oct/4/99<BR>

  2. #2
    Sathiya Guest

    Default RE: How do I detect a duplicate record before inse

    for example you need to enter name which is to be unique. we get the name from the textbox and check whether it is in the table or not and add to the table<BR><BR>sqlstr = "Select * from table where name = "<BR>sqlstr = sqlstr & "&#039" & Request("Name") & "&#039"<BR>rsNa = Connection.execute(sqlstr)<BR><BR>If rsNA.Eof Then<BR> Add the records<BR>Else<BR> Record is already is their<BR>end if

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •