where clause for integer

I am trying to get a recordset based off of the integer value of a column
Dim sql as String = “SELECT * from Rabbit WHERE GenderID = 2”
GenderID is an integer column that will have only a value of 1 or 2.

I get all the rows back. Should limit them. What do I have to do?
I am sure it is simple, but I have not been able to find the documentation or example of this.

Are you saying you are getting back rows where GenderID is NULL or not 2?

what db ?
that would go a long way to making any sort of helpful comment

There are only rows that have a value of 1 or 2 in them.
There are only 10 rows. two of the rows have a 1 the rest a 2 of the genderID
I am getting back all 10 rows. It is as if the where clause is not being used.
I am using SQLite.

would have to see how you loaded the db or maybe even a copy of the db to see but this shouldn’t be happening the way you describe

Perhaps post the actual code?

what do you get with this statement

SQL="SELECT genderID,count(*) from rabbits group by genderID"

you SHOULD get
1 2
2 8

if not, then you data is not what you think it is