Without seeing your code I can not say what is causing the error.If you are using SQL Security then the following example is how to create the account and grant access to a databaseuse pubsgoexec sp_addlogin @loginame = 'testuser2', @passwd = 'thisisapassword', @defdb = 'pubs'goexec sp_grantdbaccess 'testuser2'
If you are using NT Integrated security then this is how it is doneuse pubsgoexec sp_grantlogin 'Corporate\TestUser1'goexec sp_grantdbaccess 'Corporate\TestUser1'
You only need to use the "role" stored procedures if you are adding your logins to SQL Roles.HTHPaul