你的adoRs要先打开,然后才能设置。

解决方案 »

  1.   

    错误是:对象变量或with 块变量没设置
      

  2.   

    To:songyangk(小草) 
    help me
      

  3.   

    ADORS是打开 的,不过adors.recordcount=0
      

  4.   

    你还是不要用绑定吧,用msflexgrid.additem方法。
      

  5.   

    查看MSDN看看msFlexGrid和DataGrid这两个控件的区别你就会为知道为什么了。
      

  6.   

    用msflexgrid.additem方法
    msflexgrid.additem rs.recordset吧!
      

  7.   

        strCnn = "provider=microsoft.jet.oledb.4.0;data source=" & AppPath & "compound.mdb"
        cnnCompound.CursorLocation = adUseClient
        cnnCompound.Open strCnn    rsCompoundDetail.Open "select 'xh' ,namespec,factory,cooperatequantity from compound_material where cid=" & rsCompound("cid") & " order by segmentno", cnnCompound, adOpenDynamic, adLockOptimistic
        Set flexgridCompoundDetail.DataSource = rsCompoundDetail
      

  8.   

    我怀疑,msflexgrid不支持ADO.我用ADODC与它绑定也不行,与dao的data绑定就可以
      

  9.   

    msflexgrid 不支持ADO;mshflexgrid可以!