标题: SQl链接表出错 [打印本页] 作者: 石三少 时间: 2010-4-22 15:09 标题: SQl链接表出错 Private Sub Form_Load()
Dim str As String
Dim dbs As Database
str = "SELECT * FROM 用户管理表"
Set dbs = CurrentDb
Set rec = dbs.OpenRecordset(str, dbOpenDynaset)
If rec.EOF Then
coun = 0
Else
rec.MoveLast
coun = rec.RecordCount
End If
rec.Close
dbs.Close
Set rec = Nothing
Set dbs = Nothing
End Sub
用户管理表为SQL链接表
ACCESS中打开出现
[attach]42042[/attach]
如果用户管理表为ACCESS数据表就不会有这个问题,如何解决作者: 石三少 时间: 2010-4-23 08:41
问题解决了
其实只要把
Set rec = dbs.OpenRecordset(str, dbOpenDynaset)
改成Set rec = dbs.OpenRecordset(str, dbOpenDynaset, dbSeeChanges)就OK了