代码不知为什么不行,系统报“对象或提供程序不能执行所需的操作。”Option ExplicitDim cn As ADODB.Connection
Dim adox_Catalog As adox.CatalogPrivate Sub Form_Load()
    
    Dim objProperty As adox.property
    
    Set cn = New ADODB.Connection
    Set adox_Catalog = New adox.Catalog
    
    cn.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;PWD=520117;Initial Catalog=db_main;Data Source=Localhost"
    cn.Open
    
    Set adox_Catalog.ActiveConnection = cn
   
    If IsNull(adox_Catalog.Tables("t_webconfig").Columns("f_id_pk").Properties("Autoincrement").Value) Then
        Debug.Print True
    End If
   ' For Each objProperty In adox_Catalog.Tables("t_user").Columns("f_userid_pk").Properties
    
       ' Debug.Print objProperty.Name '& "|:" & objProperty.Value & vbCrLf
    'Next
End Sub