View Single Post
Old 11.06.2006, 19:22   #10
GMan
Архивный участник
 
Join Date: Sep 2005
Posts: 198
Default

to stop that error message update you lin_LoadDayUsedTime to this


/********************************************
lin_LoadDayUsedTime
load account's today used time
INPUT
account_id
OUTPUT
return
used sec INT
made by
G-Man
date
04-20-2005
********************************************/
CREATE PROCEDURE [dbo].[lin_LoadDayUsedTime]
(
@account_id INT
)
AS

SET NOCOUNT ON

IF NOT EXISTS (SELECT TOP 1 used_sec, convert(varchar(19), last_logout, 121) FROM time_data (nolock) WHERE account_id = @account_id)
INSERT INTO time_data VALUES(@account_id, GETDATE(), 0)

SELECT TOP 1 used_sec, convert(varchar(19), last_logout, 121) FROM time_data (nolock) WHERE account_id = @account_id
GO
GMan is offline