mdlMain.bas
上传用户:tqlouisa
上传日期:2013-04-03
资源大小:742k
文件大小:1k
- Attribute VB_Name = "mdlMain"
- '定义用户类型
- '声明会局变量
- Public g_blogin As Boolean
- Public g_bAdmin As Boolean
- Public Const Manager = 4
- Public Const General = 2
- Public Const Guest = 1
- Public gintMode As Integer
- Public flagEdit As Boolean
- Public sqlStr As String
- Public flagSearch As Boolean
- Public sql As String
- '查找用户
- Public Function IsExistuser(strUserName As String, strpwd As String) As Boolean
- Dim cmd As Command
- Dim rs As Recordset
- Set cmd = New Command
- If DataE.conLibrary.State = adStateClose Then
- DataE.conLibrary.Open
- End If
- cmd.ActiveConnection = DataE.conLibrary
- cmd.CommandText = "select * from UserInfo where username='" & strUserName & "'"
- If strpwd <> "" Then
- '登录
- cmd.CommandText = cmd.CommandText + " and pwd='" & strpwd & " '"
- End If
- Set rs = cmd.Execute
- If rs.RecordCount <> 0 Then
- IsExistuser = True
- If g_blogin Then
- End If
- Else
- '没有此用户
- IsExistuser = False
- End If
- End Function