Have you closed it?You can't open it twice!
Be sure of Checking if it is opened before open it is a good idea.

解决方案 »

  1.   

    to xyzboat:
    可是我是在MyDlg类中的消息成员函数中执行findqueryset.Open(AFX_DB_USE_DEFAULT_TYPE,SQLstr),
    而CRecordset类的对象实例findqueryset就是在MyDlg中作为成员变量定义的呀,
    如果我点击一次按钮后就关闭对象findqueryset,那么我再次点击按钮时,
    findqueryset都被关闭了,怎么执行查询呀
      

  2.   

    You must avoid of opening a Recordset object twice before closed it.
    If "findqueryset" is a member of "MyDlg",Your can open "findqueryset" at other place.Once you've opened it,you don't have to open it another time at all.
    If you do want to query, you can call other member function of CRecordset such as GetFieldValue().For more info, send me your code and Data source configuration.
    And I do have a sample useing CRecordset if you want.
      

  3.   

    to xyzboat:
    好的,如你有例子程序的话最好啦。
    (我想要一份)