Dim Rs,strSQL
Set Rs=server.CreateObject ("ADODB.RecordSet")
On Error Resume Next
'//////////////////添加用户基本信息/////////////////////
StrSQL="select * from Users where UserID=0"
Rs.CursorLocation=3
Rs.open StrSQL,conn,1,3
Rs.AddNew
Rs("UserName") = UserName
Rs("RealName") = RealName
Rs("Userpwd") = Password
Rs("Email") = Email
Rs("State") = State
Rs.Update
Rs.close
If Err.number0 then
AddUsers = False
Else
AddUsers = True
End IF
End Function
Public Function EditUsers(UserID,RealName,Password,Email,State)
Dim Rs,strSQL
Set Rs=server.CreateObject ("ADODB.RecordSet")
'On Error Resume Next
'//////////////////修改用户基本信息/////////////////////
Conn.Execute "Update Users Set RealName='"&RealName&"',Userpwd='"&password&"',state="&state&" where UserID="&UserID&""
If Err.number0 then
EditUsers = False
Else
EditUsers = True
End IF
End Function
%>