永发信息网

用SQL查询分析 说列名“online”无效 网站会员登录不能用

答案:2  悬赏:60  手机版
解决时间 2021-05-04 01:56
  • 提问者网友:最爱你的唇
  • 2021-05-03 15:21

SQL代码如下

Alter Proc usp_Try_GameLogin_Taiwan

@UserID varchar(18),
@InPassword varchar(18),

@SessionID bigint,
@UserIP varchar(15),

@UserUID int = 0,
@LoginType smallint = 1,
@LoginTime datetime = null

AS

SET NOCOUNT ON

DECLARE
@EnPassword varchar(32),
@InEnPassword varchar(32),

@Leave tinyint,
@Status smallint,

@CompanyIP varchar(15),
@TempIP varchar(15)

SET @Status = -1
SET @LoginTime = GETDATE()

SET @CompanyIP = '61.107.81'
SET @UserIP = LTRIm( RTRIm(@UserIP) )

SELECt @UserUID=UserUID,@EnPassword=pw, @Status=Status, @Leave=Leave FROM Users_Master WHERe UserID = @UserID
-- NotExist User OR Leave User
IF( @UserUID = 0 OR @Leave = 1 )
BEGIN
SET @Status = -3
END
ELSE
BEGIN
-- Check Password
IF ( @InPassword <> @EnPassword )
BEGIN
SET @Status = -1
END
END

-- BlockUser Check
IF( (@Status >= 2) AND (@Status <= 6) )
BEGIN
-- Get Block Limit Date AND Replace date text
DECLARE @BlockEndDate datetime
SELECT @BlockEndDate = BlockEndDate FROM Users_Block WHERe UserUID = @UserUID
IF ( @@ROWCOUNT <> 0 )
BEGIN
-- Block Release
IF ( @BlockEndDate <= @LoginTime )
BEGIN
SET @Status = 0
UPDATE Users_Master SET Status = @Status WHERe UserUID = @UserUID
END
END
END

-- Admin IP Check(2006-02-21)

-- Select
SELECT @Status AS Status, @UserUID AS UserUID

--设置登陆状态
UPDATE Users_Master SET Online = 1 WHERe UserUID = @UserUID

-- Log Insert
IF( @Status = 0 OR @Status = 16 OR @Status = 32 OR @Status = 48 OR @Status = 64 OR @Status = 80 )
BEGIN

EXEC usp_Insert_LoginLog_E @SessionID=@SessionID, @UserUID=@UserUID, @UserIP=@UserIP, @LogType=0,

@LogTime=@LoginTime, @LoginType=@LoginType
END


SET NOCOUNT OFF
GO

网站会员登录出现

“/”应用程序中的服务器错误。 OnLine

说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.IndexOutOfRangeException: OnLine

源错误:

执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。

堆栈跟踪:

[IndexOutOfRangeException: OnLine] System.Data.ProviderBase.FieldNameLookup.GetOrdinal(String fieldName) +4836882 System.Data.SqlClient.SqlDataReader.GetOrdinal(String name) +67 System.Data.SqlClient.SqlDataReader.get_Item(String name) +15 SourceWorld.GameDeal.UserData._ً(String ٌ, String ٍ, Int32& ف, Int32& َ) +267 SourceWorld.GameDeal.UserData.ChkGameLogin(String user, String pwd, Int32& Point, Int32& OnLine) +17 SourceWorld.Web.Login1.ImageButton1_Click(Object sender, ImageClickEventArgs e) +727 System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +108 System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +118 System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

版本信息: Microsoft .NET Framework 版本:2.0.50727.3053; ASP.NET

最佳答案
  • 五星知识达人网友:三千妖杀
  • 2021-05-03 15:58

UPDATE Users_Master SET [Online] = 1 WHERe UserUID = @UserUID


或查明 Users_Master 中有无 online 字段

全部回答
  • 1楼网友:慢性怪人
  • 2021-05-03 16:11

-- Select SELECT @Status AS Status, @UserUID AS UserUID

--设置登陆状态 UPDATE Users_Master SET Online = 1 WHERe UserUID = @UserUID

你的SELECT 语句无 FORM语句

我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯