This is my code how the app can continue with duplicate record
SqlStr=“INSERT INTO PhoneMSG(SocioName,SocioNum,MsgPhone) VALUES (’” + Rs.Column(“SocioName”).StringValue +"’,’" + Rs.Column(“SocioNum”).StringValue + “’,’” + PhoneNumStr + “’)”
Try
DBConn.ExecuteSQL(SqlStr)
Catch error As DatabaseException
mm= error.Message
End Try
What’s the problem? Unless the table is set up to not allow them, databases can have duplicate records. So, assuming your SQL statement has no errors, the code you show should be fine.
If your intent is to not allow duplicates, you either have to set up the column(s) as unique and specify the conflict resolution or try to retrieve the record from the database first and, if the record is not found, do the INSERT.
[quote=479998:@Alexis Colon Lugo]Ok
so is no way to skip that type of error.
thanks[/quote]
I’m still not sure what you are trying to accomplish. Are you trying to prevent duplicate records? Or do you want them but the database won’t permit it? What message is being returned in Error.Message?