动态绑定DataGrid1.DataSource为Recordset
sql = "select * from table1"
rs.CursorLocation = adUseClient ''''一定要设置为客户端游标,一:为了DATAGRID显示数据;二:提高性能 如果不设置游标,则无法显示数据,极为重要!经常出错!
rs_order.Open sqlod, conn, adOpenStatic, adLockOptimistic
Set DataGrid1.DataSource = rs_order
DataGrid1.Refresh
阅读(3750) | 评论(2) | 转发(0) |