Rusty Hammond
rusty.hammond at cpiqpc.com
Mon Jun 7 09:11:27 CDT 2010
Have you tried creating a user on the SQL server then scripting that user? That should give show you everything you need to create a new user. To script a user, just right click on the user, select Script User as, then Create to, then you have the option of a new query window, a file, the clipboard for saving the sql script. HTH, Rusty -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Darren - Active Billing Sent: Monday, June 07, 2010 1:02 AM To: 'Access Developers discussion and problem solving' Subject: [AccessD] A2003: SQL Server - Create Users 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 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com ********************************************************************** WARNING: All e-mail sent to and from this address will be received, scanned or otherwise recorded by the CPI Qualified Plan Consultants, Inc. corporate e-mail system and is subject to archival, monitoring or review by, and/or disclosure to, someone other than the recipient. **********************************************************************