提供SQL Server为后台数据库的简便方法.
--建表
CREATE TABLE Users(
UserID Varchar(10),
UserPW Varbinary (60))
go
--插入记录.
--注意..当你插入记录时.要使用SQL Server的Encrypt函数..
INSERT INTO USERS values('TestUser1',ENCRYPT('TestPW1'))
INSERT INTO USERS values('TestUser2',ENCRYPT('TestPW2'))
INSERT INTO USERS values('TestUser3',ENCRYPT('TestPW3'))
INSERT INTO USERS values('TestUser4',ENCRYPT('TestPW4'))
--查询时.
select * from users where UserID='TestUser1' and UserPW=encrypt('TestPW1')