Simple Login Project using Stored Procedures in ASP.NET: Part - 1


Introduction

After reviewing the huge responses and visits on my one of the article titled "Simple Login Project in ASP.NET", I decided to convert this on stored procedure too. Now, by using this article user will accelerate or fast-up his login job. I am assuming, you are already familiar with stored-procedures. I am adding some more new stuff in my previous article (look on above URL), so I will recommend you to read that before getting started here. Even all the basics like database designing, form designing, configuration settings are not discussed here. Let’s look at some advantages of using stored procedures.

Advantages of Stored Procedures

Enhanced Security

Instead of writing our SQL queries in code-behind, we can write and store it on database server instead of file server. This process will add more security for our applications.

Precompiled Execution

SQL Server compiles each stored procedure once and then reutilizes the execution plan. This results in tremendous performance boosts when stored procedures are called repeatedly.

Reduced client/server Traffic

If network bandwidth is a concern in your environment, you'll be happy to learn that stored procedures can reduce long SQL queries to a single line that is transmitted over the wire.

Efficient reuse of code and programming abstraction

Stored procedures can be used by multiple users and client programs. If you utilize them in a planned manner, you'll find the development cycle takes less time.

Creating Stored Procedures


In above image, I have created three stored procedures:

(i) CheckUser

This procedure will ask for two values, username and password and search the existence of matched username and password. This procedure will be called from login page.

(ii) CheckUsernameExistance

This procedure will ask for single value, username and check it from database, if no such username available will be used for new user account. This procedure will be called from new account registration page.

(iii) CreateNewUser

This procedure will ask for four values, fullname, username, password and emailid of user and creates new user account. This procedure will be called from new account registration page.
Find more explanation in next post.

Comments

Popular posts from this blog

Customize User's Profile in ASP.NET Identity System

Lambda two tables and three tables inner join code samples