MSHFlexGrid1绑定的问题
sql = "SELECT * FROM z_warehouse"
Set rs = New ADODB.Recordset
rs.CursorLocation = adUseClient
rs.Open sql, conn, adOpenDynamic, adLockBatchOptimistic
Set MSHFlexGrid1.DataSource = rs
我在窗体上放了一个MSHFlexGrid控件,如上代码不能运行,红色那句会提示出错
同样的,我放上一个DataGrid控件,用如下代码
Set DataGrid1.DataSource = rs
就能显示,这说明数据找开是正常的,就是绑定不到MSHFlexGrid上,这是什么问题呢?
[解决办法]
呵呵 那就给分吧
[解决办法]
rs.Open sql, conn, adopenkeyset,adlockreadonly
Set MSHFlexGrid1.DataSource = rs
rs.close