发布于 2015-04-28 08:19:57
1楼
如果前面的数据库连接正确的话,查询记录集部分可以这样来写:
Set objRecordset = CreateObject("ADODB.Recordset")
Set objRecordset .ActiveConnection = objConnection
With objRecordset
.CursorLocation = 3 'adUseClient
.CursorType = 3 'adOpenStatic
.LockType = 1 'adLockReadOnly
.Source = strSQL
.Open
End With
.......
Set Grid.DataSource = objRecordset
无论成与败,无论甜与苦,我还是我。