You could use osql or sqldbo from install shield setup to run this sp to
grant access to the database. Im sure there are other or better ways.
sp_grantdbaccess [@loginame =] 'login'
[,[@name_in_db =] 'name_in_db' [OUTPUT]]
Hananiel
"Bagger" wrote:
> I've got an application that requires a SQL Server 2000 database. I have
> added a
> custom action to my setup project to create the database during the install.
> That part works fine. What I need to do now is set up a user for the
> database. That's what I'm not sure how to do. During development, the app
> has simply logged in as the 'sa' user. I'm definitely not a SQL Server
> expert, so I'm not really sure what needs to be done to create a user that
> the application can login as. From what I can tell, it looks like I need to
> have a database user set up, and that user needs to be tied to a Windows
> account. What info do I need to prompt the user for during installation, and
> how do I use that info to set up a user for the database that my application
> can use to login? Is there some way I can get the Windows user account that
> they are using to install the app, and tie a database user to that account?
|