[AccessD] A2003: SQL Server - Create Users

Darren - Active Billing darren at activebilling.com.au
Mon Jun 7 01:02:13 CDT 2010


Hi team

 

In my Access 2003 app connecting to a 2005 SQL Server

I want to 

1        Create a user (This I can do) with a PWD (This I can do)
I also want to
2        Add this user to a 'default' database 

And

3        Assign them to 3 already configured roles on this default dB

Make sense? 

This is all I have so far (Part 1)

 

use SOMEDB

exec sp_droplogin Me.txtLoginName

exec sp_addlogin Me.txtLoginName, Me.txtLoginPassword

 

This will drop and create the user with password
Anyone got any suggestions for the other 2 bits?

Many thanks 

Darren

 

 




More information about the AccessD mailing list