[求助]为什么在DataGrid中显示不出来??
希望数据在DataGrid中显示出来为什么不可以,不知哪出错请多多指教
呵呵。。附件忘记传上去了,请各位帮帮忙
ADO隐式连接:
Dim rs As Recordset
Set rs = New Recordset
Set cn = New Connection
rs.Open "SELECT * FROM employee", _
"Provider=SQLOLEDB;User ID =sa;Password=12345;" & _
"Data Source=5532D9DC138D4A6\WINCC;" & _
"Initial Catalog=pubs", _
adOpenKeyset, adLockOptimistic
Set DataGrid1.DataSource = rs
DataGrid1.Refresh
试试看!