Private Sub Form_Load()
Set adors = GetRecordSet("select * from zl_Products")
If (adors.RecordCount > 0) Then
   Set dg_main.DataSource = adors
Else
    Set dg_main.DataSource = Nothing
End If
End Sub
这是赋值代码,当数据库中没有数据时
Set dg_main.DataSource = Nothing
然后窗口中的dg中显示一行空的,我设置了dg的属性为allowaddnew allupdate为true
可以却不可以编辑,
如果开始时数据库里有东西就可以,这个怎么解决啊?还有就是VB所有控件的用法哪里有啊?