标题:求解~做了一个有权限的数据怎么显示没有权限读取
只看楼主
admin73896
Rank: 1
等 级:新手上路
帖 子:43
专家分:0
注 册:2014-5-9
结帖率:81.82%
 问题点数:0 回复次数:0 
求解~做了一个有权限的数据怎么显示没有权限读取
Dim conn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim sql As String
Dim connstr As String
connstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\VB数据\njzhxt.mdb;Persist Security Info=False"
sql = "select * from [njzhxt] where uesrname='" & Text1.Text & "'"
conn.CursorLocation = adUseClient
conn.connectionstring = connstr
conn.Open
rs.Open sql, conn, adOpenStatic, adLockOptimistic, 0
'Set rs = conn.Execute(sql)
'rs.Open sql, conn, adOpenStatic, adLockOptimistic
If rs.RecordCount = 0 Then
MsgBox "用户不存在"
rs.Close
conn.Close
Exit Sub
End If
If Text2.Text <> rs("password") Then
MsgBox "密码错误"
rs.Close
conn.Close
Else
rs.Close
conn.Close
form2.Show
Unload Me
End If
      
End Sub

Private Sub Form_Load()
Dim conn As New ADODB.Connection
Dim connectionstring As String
connectionstring = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & "D:\VB数据\njzhxt.mdb;Persist Security Info=False"
搜索更多相关主题的帖子: False where 
2014-05-22 13:38



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-431907-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 2.980196 second(s), 7 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved