db.Open("db1", FALSE, FALSE, "ODBC;",
CString m="SELECT * FROM [table1]";
short nFields = rs.GetODBCFieldCount();
Environment : I am using Visual C++ to developed my front end application. I am using ODBC as my interface and i'm using MS Access as my database.
Problem : The program above keeps giving me the total number of records found in the recordset. What i have learn about GetODBCFieldCount is it retrieves the number of records found in your recordset.
Question : How do i get the number of records in the recorset based on a criteria. For instance : In the recordset there are rows containing name like John and etc. If lets say there is five people with the name John. How do i get the value 5 from the recordset.