Quick Question. I have a table which has a primary key being varchar(10). Is there a way to check for duplicate PK before inserting in generated code or I have to check that manually?
Regardless of the type, you have to check it manually.
Or you may try to insert with a try catch block this will save you a visit to the database if the key was new, thus the Insert will suceed in one shot.
Regardless of the type, you have to check it manually.
Or you may try to insert with a try catch block this will save you a visit to the database if the key was new, thus the Insert will suceed in one shot.