
ProTech-Online.com
Microsoft SQL code example for creating webpage session records.
USE [sans]
GO
/****** Object: StoredProcedure [dbo].[create_sessions] Script Date: 10/19/2011 11:06:51 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
--
=============================================
-- Author: <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
--
=============================================
CREATE PROCEDURE [dbo].[create_sessions]
-- Add the parameters for the stored procedure here
@sessionid uniqueidentifier,
@userid nvarchar(256),
@clienthash char (40),
@timeout datetime
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
INSERT INTO [dbo].[sessions]
(sessions.sessionid, sessions.userid, sessions.clienthash, sessions.timeout)
VALUES(@sessionid, @userid, @clienthash, @timeout)
END
GO
Copyright © 2013 ProTechs-Online.com; All rights reserved.