sqlserver2005 ado 查询问题
代码如下,
strNewSql.Format("use %s\r\nSelect * FROM %s", dbOld, newArray[i]);
result=m_pNewRecordset->Open((_bstr_t)strNewSql, // 查询DemoTable表中所有字段
m_pConnection.GetInterfacePtr(), // 获取库接库的IDispatch指针
adOpenDynamic, // adOpenStatic, //adOpenDynamic, //创建静态记录集
adLockOptimistic,
adCmdText);
int a=m_pNewRecordset->RecordCount;