dim rs as recordset
dim xx as new 你的类set rs=xx.取得记录集的方法set datagrid1.datasource=rs

解决方案 »

  1.   

    请问向activexDLL中的传递 调用这个DLL的窗体上ADODC1的Recordset?
    'dll中
    Public mADODC1 As ADODB.Recordset '传记录集
    Public Property Let adodc1(ByVal vNewValue As ADODB.Recordset)
    madodc1 = vNewValue
    End Property
    '工程中
    Dim gcxyfyp As New xtszdll.yfyp
    gcxyfyp.mADODC1 = Adodc1.Recordset‘说类型不匹配
      

  2.   

    Private mADODC1 As ADODB.Recordset '传记录集
    Public Property Set adodc1(ByVal vNewValue As ADODB.Recordset)
    Set madodc1 = vNewValue
    End Property
      

  3.   

    Dim gcxyfyp As New xtszdll.yfyp
    set gcxyfyp.adodc1 = Adodc1.Recordset‘说类型不匹配
      

  4.   

    参考msdn 创建activex dll 分步教程