hi all, i want the application to show error message if the searched object is not in the database or if the user is trying to insert the same value again plz suggest some code.
Don't know what database you are using but
Dim mReader as SqlReader
Dim strSQL as String
strSQL = "Select count(*) from yourtable where Value = " & Value
Dim mCommand as new SqlCommand(mConn,strSQL)
result = cmd.ExecuteScalar
if result is nothing then
'you have no results
end if