Generally, SQL Server is used as the background database. The simplest and easiest way to encrypt user passwords and verify passwords is to use SQL Server's own functions, which is convenient, fast, and easy to use. However, it is worth noting that the English version of the operating system and the English version of SQL Server have always been used, and the password field type of the data table is set to any varchar type, then we can use pwdencrypt and pwdcompare built-in functions! However, the problem is that the Chinese version of the operating system and the Chinese version of the database are used, and the character set of the database is changed to the Chinese character set. The type of this password field is varchar and does not work.
Change the password field type to nvarchar. OK! The functions of the two functions work again!
Really speechless... little thing.