Click here to Skip to main content
15,925,499 members
Home / Discussions / Database
   

Database

 
AnswerRe: Inner Joins Not Working Pin
Blue_Boy15-Aug-07 0:22
Blue_Boy15-Aug-07 0:22 
AnswerRe: Inner Joins Not Working Pin
Brendan Vogt15-Aug-07 0:21
Brendan Vogt15-Aug-07 0:21 
AnswerRe: Inner Joins Not Working Pin
Pete O'Hanlon15-Aug-07 3:01
mvePete O'Hanlon15-Aug-07 3:01 
QuestionFull Text Search Issues Pin
Brendan Vogt14-Aug-07 22:43
Brendan Vogt14-Aug-07 22:43 
Questionpassword check-lowercase and uppercase Pin
dheema14-Aug-07 21:22
dheema14-Aug-07 21:22 
AnswerRe: password check-lowercase and uppercase Pin
andyharman14-Aug-07 22:01
professionalandyharman14-Aug-07 22:01 
GeneralRe: password check-lowercase and uppercase Pin
dheema14-Aug-07 23:44
dheema14-Aug-07 23:44 
GeneralRe: password check-lowercase and uppercase Pin
andyharman15-Aug-07 0:51
professionalandyharman15-Aug-07 0:51 
Your text password column probably has a case-insensitive collation. Making it case-sensitive depends on your database software. Unser SQL-Server you would use the COLLATE clause of the ALTER TABLE statement.

If you are using SQL-Server 2005 then the HashBytes function can be used to create a hash of your password. To store the hash:
insert into UserTable values (@UserName, HashBytes('SHA1', @UserName + @Password))
To check if a user's password is correct:
select 1 from UserTable
  where UserName = @UserName
  and PasswordHash = HashBytes('SHA1', @UserName + @Password)
If you just hash the password then you would be able to see which users have the same password (because they would have the same hash value). It is better practice to "seed" the hash - so most people concatenate the user id (as above).

Hope that helps.
Andy



If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message".

GeneralRe: password check-lowercase and uppercase Pin
dheema15-Aug-07 1:36
dheema15-Aug-07 1:36 
GeneralRe: password check-lowercase and uppercase [modified] Pin
dheema15-Aug-07 1:42
dheema15-Aug-07 1:42 
GeneralRe: password check-lowercase and uppercase Pin
andyharman15-Aug-07 7:31
professionalandyharman15-Aug-07 7:31 
Question???? Top And Desc Pin
AnhTin14-Aug-07 17:50
AnhTin14-Aug-07 17:50 
AnswerRe: ???? Top And Desc Pin
andyharman14-Aug-07 22:04
professionalandyharman14-Aug-07 22:04 
QuestionGROUP BY problem (MSSQL) Pin
Yaron Ben-Ami14-Aug-07 5:48
Yaron Ben-Ami14-Aug-07 5:48 
AnswerRe: GROUP BY problem (MSSQL) Pin
Colin Angus Mackay14-Aug-07 5:51
Colin Angus Mackay14-Aug-07 5:51 
AnswerRe: GROUP BY problem (MSSQL) Pin
Colin Angus Mackay15-Aug-07 13:18
Colin Angus Mackay15-Aug-07 13:18 
QuestionProblems connecting to old DBF with OleDB and .NET (C#) Pin
MSgt~Nesher14-Aug-07 3:56
MSgt~Nesher14-Aug-07 3:56 
AnswerRe: Problems connecting to old DBF with OleDB and .NET (C#) Pin
Michael Potter14-Aug-07 9:23
Michael Potter14-Aug-07 9:23 
GeneralRe: Problems connecting to old DBF with OleDB and .NET (C#) Pin
MSgt~Nesher14-Aug-07 20:52
MSgt~Nesher14-Aug-07 20:52 
GeneralRe: Problems connecting to old DBF with OleDB and .NET (C#) Pin
MSgt~Nesher14-Aug-07 22:19
MSgt~Nesher14-Aug-07 22:19 
QuestionHow to Get Primary Key From the Table Return From Database Pin
N a r e s h P a t e l14-Aug-07 3:44
N a r e s h P a t e l14-Aug-07 3:44 
AnswerRe: How to Get Primary Key From the Table Return From Database Pin
Blue_Boy14-Aug-07 4:45
Blue_Boy14-Aug-07 4:45 
QuestionConnecting to SQL 2005 Express remotely Pin
GermanDM14-Aug-07 3:20
GermanDM14-Aug-07 3:20 
Questionfatch specified no Pin
MHASSANF14-Aug-07 3:09
MHASSANF14-Aug-07 3:09 
AnswerRe: fatch specified no Pin
Krish - KP14-Aug-07 3:17
Krish - KP14-Aug-07 3:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.