I'm performing a SELECT query to get the student ID. I'm getting the following error:

Conversion from String "SELECT est_ID FROM ESTUDIANTE WH" tp type 'Long' is not valid

Here is the code:

Try
Using Con As New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=" & globalvariable.dbpath
& ";Integrated Security=True;User Instance=True")
Con.Open()
Using com As New SqlCommand("SELECT est_id FROM ESTUDIANTE WHERE est_nombre ="
& Val(txtNombre.Text) And "est_apellido =" & Val(txtApellido.Text), Con)
Dim textObj = com.ExecuteScalar
If Not textObj Is Nothing AndAlso Not textObj Is DBNull.Value Then
txtID.Text = CInt(textObj)
End If
End Using
End Using

Catch ex As Exception
MessageBox.Show(ex.Message)

End Try

THX...