I have been researching why my below OleDBCommand ExecuteScalar function is not properly returning the correct data.
query = "SELECT Count(*) FROM NoteTable WHERE SQLMigrationFl <> 'Y'";
command = new OldDbCommand(query, connection);
var remainingNotes = (int)command.ExecuteScalar();
My connection is defined previously, and is successfully used by other queries. My Access database has 99 records in it; however, when I run the above code it only returns 10. When I remove the WHERE statement it returns all 99; however, that will not help when the SQLMigrationFl begins to be populated with a 'Y'. Any thoughts on why the ExecuteScalar function is not returning what I expect it to?
Thanks