Board index » delphi » Add User/Login MS SQL 7

Add User/Login MS SQL 7

Hi

I can add a login using the built-in stored procedure.
I can add a user using the built-in stored procedure.

But no matter what I do, the user appears in the 'master' database,
not the one I want, even though the user/login was created with
permissions to use my database, not the master.

What am I doing wrong?  

Daniel J. Wojcik
****************
http://www.genjerdan.com

 

Re:Add User/Login MS SQL 7


Where are you executing this stored procedure? The users are probably
getting created in the database you are logged on to.

If you are connecting to the SQL Server without specifying which database
you want to use, the default is to log on to the master database. BDE will
connect to only *one* database in MS SQL Server. Make sure it is the right
one.

If you are connecting through ODBC, you can specify this in the DSN creation
stage, to override the default database with the want you want to use.

If you are connecting through the BDE driver, you can specify this in the
DATABASE NAME property of the Alias property page in the BDE Administrator.

May the code be with you.

Marcelo Lopez Ruiz

Re:Add User/Login MS SQL 7


On Mon, 28 Jun 1999 10:08:53 -0300, "Marcelo Lopez Ruiz"

Quote
<marcelo.lopezr...@xlnet.com.ar> wrote:
>Where are you executing this stored procedure? The users are probably
>getting created in the database you are logged on to.

That's the problem, though.  

I have to log in as 'sa' (or someone with sa permissions), which puts
me in the master db. I don't want to give add-user permissions to the
regular login.

Maybe if I create another admin type of user for that db?  Probably.

Is there no way to add a user to a different database?

You'd think the grand master sa login could do anything.  :>(

Daniel J. Wojcik
****************
http://www.genjerdan.com

programming, and other things best done in private

Other Threads