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*
答案 0 :(得分:0)
数据绑定网格(DBGrid)用于DAO,而DataGrid用于ADO。
在工具箱中:右键单击,选择“组件...”,并确保选中'Microsoft DataGrid Control 6.0 (SP6) (OLEDB)'
,不 'Microsoft Data Bound Grid Control 5.0 (SP3)'
。