Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2005 > SQL Server 2005
|
SQL Server 2005 General discussion of SQL Server *2005* version only.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 2nd, 2008, 02:19 AM
Authorized User
 
Join Date: Aug 2007
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to zrtv
Default Password Field in Sql Server 2005 Plz help

Hi All,
I want to create a user table having userId and password field.
Can any one tell me how to store passwords in sql server field,

In Ms Access there is "INPUT MASK " to hide the password.




 
Old January 3rd, 2008, 12:51 AM
Friend of Wrox
 
Join Date: Oct 2007
Posts: 130
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via AIM to urtrivedi
Default

You can use binary datatype, it will not directly show you the value.
You can use cast function while inserting text and retreving binary value.
Syntax.
insert into table1 (uid,pwd) values('emp1',cast('mypwd' as binary))

select uid, cast(pwd as varchar)as pwd from table1




urt
 
Old January 7th, 2008, 06:26 PM
SQLScott's Avatar
Wrox Author
 
Join Date: Dec 2004
Posts: 338
Thanks: 0
Thanked 2 Times in 2 Posts
Default

SQL Server uses encryption and stores the encrypted data as varbinary. Look up encryption in BOL. There you will find information on EncryptByKey and DecryptByKey to encrypt and decrypt your data.


========================
Scott Klein
Author of:
Professional SQL Server 2005 XML
Professional WCF Programming: .NET Development with the Windows Communication Foundation
Professional LINQ
========================





Similar Threads
Thread Thread Starter Forum Replies Last Post
reg conn to sql server 2005 from vb.net 2005.. veda SQL Server 2005 2 July 1st, 2008 12:16 AM
Conflict in SQL Server 2000 and SQL Server 2005 ayan.mukherjee SQL Language 0 June 30th, 2008 03:34 AM
plz help with sql server 2005 prrao C# 2005 2 June 26th, 2007 12:59 PM
migrating from sql server 2000 to sql server 2005 abinashpatra SQL Server 2005 2 December 1st, 2006 03:45 PM
Sql Server Password Retrieve itHighway SQL Server 2000 3 February 28th, 2006 09:49 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.