Let's create a sample login application for WPF beginners. Making such an application is simple because it is embedded with SQL Server as back-end, with a MahApps integrated application and a few animations.
Prerequisites → PSKSConStr,
Create a table with the columns mentioned below,
UserId → Bigint
UserId → Bigint
UserName → nvarchar
DateCreated → datetime
LastUpdate → datetime
IsActive → bit
IsDisplay → bit
IPAddress → nvarchar
PcName → nvarchar

Stored procedure

Stored procedure
- USE[PSKS]
- GO
- /****** Object: StoredProcedure [dbo].[uspGetUsers] Script Date: 7/16/2017 6:05:12 PM ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- create procedure[dbo].[uspGetUsers]
- (@UserName nvarchar(256), @Password nvarchar(256))
- as
- begin
- select * from tblUser tu
- where UserName = @UserName
- and Password = @Password
- end
- --
Solution is zipped and attached.

Guest UserPosted Sep 6, 2017, 5:20 AM
SQL Injection? And who honestly would store a password in clear text in a nvarchar field? You should better get familar with MD5 hashes and only store that.