In many applications it is important to restrict the access to only registered users. We can also create different profiles for different users to restrict access. For example, if we are developing a school management system we could have profiles like an admin: View and do everything. Lecturer profile: Attendance and internal marks entry only. Accounts profile: Financial transactions only. Admissions: Student registration, Profile entry only. In this article we are going to learn how to create a very simple login form using SQL database, the same principle can also be used for other databases like MS Access or Oracle database. We are going to create a Windows Form with two Texboxes, one for User name and the other for Password to prompt the user to enter his/her login details before accessing the main application.