[求助]为什么提示"当前行不可用"?
Option Explicit
Dim rs_reader As New adodb.Recordset
Private Sub Form_Load()
Dim sql As String
Dim conn As New adodb.Connection
conn.Open "provider=Microsoft.Jet.OLEDB.4.0; data source=" & App.Path & "\database.mdb"
sql = "select * from 销售报表"
rs_reader.CursorLocation = adUseClient
rs_reader.Open sql, conn, adOpenKeyset, adLockPessimistic
Set DataGrid1.DataSource = rs_reader
DataGrid1.AllowAddNew = False
DataGrid1.AllowDelete = False
DataGrid1.AllowUpdate = False
Label3.Caption = Date
End Sub
Private Sub Form_Unload(Cancel As Integer)
rs_reader.Close
End Sub
运行这段代码后,关闭窗体时为什么提示"当前行不可用"?要怎么解决
[此贴子已经被作者于2006-4-29 16:42:42编辑过]