Showing posts with label password. Show all posts
Showing posts with label password. Show all posts

Sunday, March 25, 2012

Create a new User

Hello,

How can I create a new user with password for the MS SQL - Server 2000
(and the MSDE) with a SQL - Statement? I use Borland Delphi 5 with the
ADO - Components!

Thanks.

best regards.
Stephan JahrlingSince you referred to password, I assume you are talking about Server logins
instead of database users. To add a new login you can use: sp_addlogin

For an existing login to add a new user to a database, you can use:
sp_adduser

Please refer to SQL Server Books Online for more details on sp_addlogin &
sp_adduser system procedures along with examples

--
- Anith
( Please reply to newsgroups only )sql

Tuesday, March 20, 2012

Create a column with binary data type

Hi, in reference to the article:

http://aspnet.4guysfromrolla.com/articles/103002-1.2.aspx

I would like to know how to create a 'password' column where the data type is a binary type of length 16
This is my table:

CREATE TABLE Staff
(
Namevarchar (50)PRIMARYKEY,
Password ?? NOT NULL,
Role varchar (50)NOT NULL
)

Please review my code. Thanks in advance for helping me out here!
-Gabian-binary(16)

Check SQL Server's Books Online that's installed with Sql Server for reference. It has a lot of knowledgebase.|||Hi,

Thanks man. I realised the mistake in the create table was in the Primary key. Because of that, I thought that there was a problem with the statement with binary. (First time creating a table with binary value here)

I have downloaded the online book. Thanks for your advice!
-Gabian-sql