How can I get the record count from the return ResultSet?
You can’t, unless you go through it. This is because ResultSet is not a container class. If you use VC++/VB CRecordSet/RecordSet class, the answer would be exact the same. They don’t load all the data from database for you, but load data for you when you need it. From functional point of view, it is more like an iterator with DB access.