If DataBaseType=1 Then
Dim Cmd : Set Cmd = Server.CreateObject("ADODB.Command")
Set Cmd.ActiveConnection=conn
Cmd.CommandText="KS_UserSQL"
Cmd.CommandType=4
CMD.Prepared = true
Cmd.Parameters.Append cmd.CreateParameter("@username",200,1,50,username)
Cmd.Parameters.Append cmd.CreateParameter("@password",200,1,50,password)
Set UserRs=Cmd.execute
Else
Set UserRS=Server.CreateOBject("ADODB.RECORDSET")
UserRS.Open "Select top 1 a.*,b.SpaceSize From KS_User a inner join KS_UserGroup b on a.groupid=b.id Where UserName='" & UserName & "' And PassWord='" & PassWord & "'",Conn,1,1
End If
改为
Set UserRS=Server.CreateOBject("ADODB.RECORDSET")
UserRS.Open "Select top 1 a.*,b.SpaceSize From KS_User a inner join KS_UserGroup b on a.groupid=b.id Where UserName='" & UserName & "' And PassWord='" & PassWord & "'",Conn,1,1