SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[cs_Page_Visits_Add]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[cs_Page_Visits_Add]
GO

CREATE  Proc [dbo].cs_Page_Visits_Add
(
	@IP nvarchar(20),
	@VisitCount int
)
AS

DECLARE @DTStamp AS DateTime
SET @DTStamp = GetDate()

INSERT INTO cs_Visits
		(IP, VisitCount, DateTimeStamp)
	VALUES
		(@IP, @VisitCount, @DTStamp)



GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO

grant execute on [dbo].cs_Page_Visits_Add to public
go
