Re: 2.2.3 CPT Always Minus
the user last login date is wrong, go to db and look at it, then create a trigger to update the date.
Code:
USE [RF_World_Novus]
GO
/****** Object: Trigger [dbo].[fix_lastconntime] Script Date: 08/19/2011 23:07:33 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
-- =============================================
ALTER TRIGGER [dbo].[fix_lastconntime]
ON [dbo].[tbl_base]
FOR UPDATE
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for trigger here
UPDATE tbl_base SET LastConnTime = convert(varchar, getdate(),12) + '' + SUBSTRING(replace(convert(varchar, getdate(), 8),':',''), 1, 4) WHERE serial = (SELECT TOP 1 serial FROM inserted)
END
you may need to adjust the date calculation.
Re: 2.2.3 CPT Always Minus
thanks sir :D
but i got error
Msg 208, Level 16, State 6, Procedure fix_lastconntime, Line 16
Invalid object name 'dbo.fix_lastconntime'.
Re: 2.2.3 CPT Always Minus
create a new trigger to that table with this name or edit the sql for create trigger, current one is for altering existing one.