Register for your free account! | Forgot your password?

You last visited: Today at 05:12

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[HELP]How to

Discussion on [HELP]How to within the Shaiya Private Server forum part of the Shaiya category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Sep 2009
Posts: 74
Received Thanks: 65
[HELP]How to

Hello i recenlty runed a query but it seems that my db misses 2 columns
So if any expert ca help me i would be very glad to thank him


Code:
Msg 207, Level 16, State 1, Procedure usp_Try_GameLogout_R, Line 39
Invalid column name 'LogoutTime'.
Msg 207, Level 16, State 1, Procedure usp_Try_GameLogout_R, Line 39
Invalid column name 'LogoutErrType'

I dont know how to add columns in there usp_Try_GameLogout_R because it's a different table located like:
PS_UserData> Programmability> Storend Procedures> dbo.usp_Try_GameLogout_R

So i have no clue how to make 2 new columns in it to solve my problem
Here is the rest of the query ...Idk maybe it will help

Code:
USE [PS_UserData]
GO
/****** Object:  StoredProcedure [dbo].[usp_Try_GameLogout_R]    Script Date: 02/07/2012 19:10:24 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/****** Object:  Stored Procedure dbo.usp_Try_GameLogout_R    Script Date: 2008-6-7 18:34:05 ******/
ALTER        Proc [dbo].[usp_Try_GameLogout_R]

@UserUID int,
@SessionID bigint,
@LogoutType smallint = 0,
@ErrType int = 0

AS

SET NOCOUNT ON

DECLARE @LogTime datetime
DECLARE @Sql nvarchar(4000)
DECLARE @yyyy varchar(4)
DECLARE @mm varchar(2)
DECLARE @dd varchar(2)
DECLARE @LogType bit	-- Login:0, Logout:1

SET @LogType = 1
SET @LogTime = GETDATE()
SET @yyyy = DATEPART(yyyy, @LogTime)
SET @mm = DATEPART(mm, @LogTime)
SET @dd = DATEPART(dd, @LogTime)

IF( LEN(@mm) = 1 )
BEGIN
	SET @mm = '0' + @mm
END

IF( LEN(@dd) = 1 )
BEGIN
	SET @dd = '0' + @dd
END

UPDATE Users_Master SET Leave = 0, LeaveDate = GETDATE() WHERE UserUID = @UserUID

UPDATE PS_GameLog.dbo.UserLog
SET LogoutTime=@LogTime, LogoutType=@LogoutType, LogoutErrType=@ErrType
WHERE UserUID=@UserUID AND SessionID=@SessionID


SET @Sql = N'
INSERT INTO PS_GameLog.dbo.UserLog
(SessionID, UserUID, LogType, LogTime, LogoutType, ErrType)
VALUES(@SessionID, @UserUID, @LogType, @LogTime, @LogoutType, @ErrType)'

EXEC sp_executesql @Sql, 
N'@SessionID bigint, @UserUID int, @LogType bit, @LogTime datetime, @LogoutType smallint, @ErrType int',
@SessionID, @UserUID, @LogType, @LogTime, @LogoutType, @ErrType

SET NOCOUNT OFF
Iulian01 is offline  
Old 08/20/2012, 11:40   #2
 
elite*gold: 0
Join Date: Sep 2009
Posts: 74
Received Thanks: 65
Bump 31 viewes no answer ?
Iulian01 is offline  
Old 08/21/2012, 11:22   #3
 
Svinseladden's Avatar
 
elite*gold: 0
Join Date: Feb 2010
Posts: 675
Received Thanks: 240
the words are wrong look in your db to set the right ones..

UPDATE PS_GameLog.dbo.UserLog

don't have the right ones:

Quote:
Msg 207, Level 16, State 1, Procedure usp_Try_GameLogout_R, Line 39
Invalid column name 'LogoutTime'.
Msg 207, Level 16, State 1, Procedure usp_Try_GameLogout_R, Line 39
Invalid column name 'LogoutErrType'
they are not there. so you have to add them or just change that to something that works..


i used logouttime as LogTime and LogoutErrType as ErrType i think..
Svinseladden is offline  
Thanks
3 Users
Reply




All times are GMT +1. The time now is 05:13.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.