Not clear how your application being structure, but there are several way to do it,
1. Try, catch statement, assuming the insert query will complaint if inserting duplicate key: example
Using Try... Catch..., Finally![
^]
2. Write another select statement to check if the empid exists before inserting
Also the code might vulnerable to SQL injection/ cross site scripting attack. Here is an example how the mentioned vulnerability works.
SQL Injection and Cross-Site Scripting[
^]
Try use Parameterized Queries if possible
Using Parameterized Queries and Reports in VB.NET Database Applications[
^]