在 ADO 中,用 Recordset 对象的 Open 方法打开记录集后,就可以用 GetRecordCount 方法获取记录数。 代码如下: CString strSQL = " SELECT * FROM authors " ; _RecordsetPtr pRs = NULL; pRs.CreateInstance( " ADODB.Recordset "