| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Stop wasting time looking for files and revisions. Connect your Gmail, DriveDropbox, and Slack accounts and in less than 2 minutes, Dokkio will automatically organize all your file attachments. Learn more and claim your free account.

View
 

CET 4584 Assignment Review Lecture - Login System

Page history last edited by PBworks 9 years, 11 months ago

 Review Lecture for CET 4584 Login System

 

 

Prerequisites

 

CET 4584 Assignment 3B - Accessing a Database

CET 4584 Assignment 4B - Creating a Login System 

 

Description of Video

 

This covers ALL steps taken in completing assignments 3B and 4B using all the coding techniques. My code (written in Visual Basic) is attached.

 

Video 

 

Download Link (right click and save target as ...). 

 

 

Reference Materials

 

CET4584Login.zip - All VB Code is included as shown in the video.

 

CategoryCodeCommon Class - http://cet4429.pbworks.com/Code+-+Category+Common+Class

DatabaseCommon class - http://cet4429.pbworks.com/Code+-+Database+Common+Class

 

Additional Information

 

Database Scripts for CET4584 Login.

 

 

USE [CET4584Login]

GO

/****** Object:  Table [dbo].[User]    Script Date: 09/29/2009 10:28:20 ******/

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

SET ANSI_PADDING ON

GO

CREATE TABLE [dbo].[User](

    [UserID] [int] IDENTITY(1,1) NOT NULL,

    [UserName] [nvarchar](63) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,

    [UserPassword] [nvarchar](63) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,

    [UserEmail] [nvarchar](127) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,

    [UserCreatedDate] [datetime] NOT NULL,

    [UserLastLoginDate] [datetime] NULL,

    [UserIsDeletedBit] [bit] NOT NULL,

    [UserType] [varchar](20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,

 CONSTRAINT [PK_users] PRIMARY KEY CLUSTERED

(

    [UserID] ASC

)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]

) ON [PRIMARY]

GO

SET ANSI_PADDING OFF

USE [CET4584Login]

GO

/****** Object:  StoredProcedure [dbo].[sp_CreateUser]    Script Date: 09/29/2009 09:31:55 ******/

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

CREATE PROCEDURE [dbo].[sp_CreateUser]

    @UserName nvarchar(63),

    @UserPassword nvarchar(63),

    @UserEmail nvarchar(63)

AS

BEGIN TRY

        BEGIN TRAN

        DECLARE @userid AS INT

        INSERT  INTO [User]

                (

                  [UserName],

                  [UserPassword],

                  [UserEmail],

                  [UserCreatedDate],

                  [UserLastLoginDate],

                  [UserIsDeletedBit],

                  [UserType]

              )

        VALUES  (

                  @UserName,

                  @UserPassword,

                  @UserEmail,

                  GETDATE(),

                  NULL,

                  0,

                  'Guest'

                )

     SET @userid = SCOPE_IDENTITY()

     COMMIT TRAN

    END TRY

    BEGIN CATCH

        ROLLBACK TRAN

        SELECT  ERROR_NUMBER() ErrorNumber,

                ERROR_MESSAGE() [Message]

    END CATCH

    RETURN @userid

USE [CET4584Login]

GO

/****** Object:  StoredProcedure [dbo].[sp_GetAllUsers]    Script Date: 09/29/2009 09:38:38 ******/

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

CREATE PROCEDURE [dbo].[sp_GetAllUsers]

AS

BEGIN

SELECT * FROM [User]

END

use [cet4584Login]

GO

CREATE PROCEDURE [dbo].[sp_VerifyLogin]

@UserName nvarchar(63),

@Password nvarchar(63)

 AS

 BEGIN

SELECT Count(*) FROM [User]

WHERE UserName = @UserName

AND UserPassword = @Password

END

GO


 

 

 

Comments (0)

You don't have permission to comment on this page.