0
    SQL> desc admin
                 Name Null? Type
           -------------------------------------
                NAME VARCHAR2(20)
                PRIVILEDGE VARCHAR2(20)
                CODE NUMBER(38)
                PASS VARCHAR2(20)

              Private Sub Form_Load()
              Set RS = New ADODB.Recordset
              If RS.State = 1 Then RS.Close
              opencn
              RS.Open "ADMIN", CN, adOpenDynamic, adLockOptimistic, adCmdTable
              Set DBGrid1.DataSource = RS
RS.Close
End Sub

我得到的错误

*Error 430 at line : Set DBGrid1.DataSource = RS
Class does not support automation or does not support expected interface*
4

1 回答 1

0

数据绑定网格 (DBGrid) 用于 DAO,而 DataGrid 用于 ADO。

在工具箱中:右击,选择'Components...',并确保'Microsoft DataGrid Control 6.0 (SP6) (OLEDB)'被选中,而不是 'Microsoft Data Bound Grid Control 5.0 (SP3)'.

于 2013-02-19T14:49:31.023 回答