'=================问题代码=================
Sql = "Select a.*,b.Operation From [_Admin] a LEFT Join [_Roles] b ON a.RoleId = b.RoleId Where (a.UserName=@UserName And a.Password=@Password)"
Set Cmd = New Command
With Cmd
.ActiveConnection = Conn
.CommandText = Sql
.CommandType = adCmdText
.Parameters.Append .CreateParameter("@UserName", adVarChar, adParamInput, 50, UserName)
.Parameters.Append .CreateParameter("@Password", adVarChar, adParamInput, 32, Password)
.Execute
End With
'====================错误信息====================='Microsoft OLE DB Provider for SQL Server 错误 '80040e14' 必须声明变量 '@UserName'。 /Manage/Login.Asp,行 3 请问这是怎么回事啊?请大家帮帮忙
Sql = "Select a.*,b.Operation From [_Admin] a LEFT Join [_Roles] b ON a.RoleId = b.RoleId Where (a.UserName=@UserName And a.Password=@Password)"
Set Cmd = New Command
With Cmd
.ActiveConnection = Conn
.CommandText = Sql
.CommandType = adCmdText
.Parameters.Append .CreateParameter("@UserName", adVarChar, adParamInput, 50, UserName)
.Parameters.Append .CreateParameter("@Password", adVarChar, adParamInput, 32, Password)
.Execute
End With
'====================错误信息====================='Microsoft OLE DB Provider for SQL Server 错误 '80040e14' 必须声明变量 '@UserName'。 /Manage/Login.Asp,行 3 请问这是怎么回事啊?请大家帮帮忙
如DECLARE @UserName varchar(10)