I have created a setup application with SQLEXpress 2008 as a prerequisite. On test SQLExpress installs OK
after the application is installed it must create and install a database using a mixture of SMO and Scripting. I used SMO to add the current user (who is a Windows Administrator) as a Login to the SQL Express server.
Dim l As Login = New Login(srv, My.User.Name)
l.LoginType = LoginType.WindowsUser
l.DefaultDatabase = "MASTER"
It fails on srv.CreateDatabase with error message "permission denied in database MASTER"
this thread talks about converting the server to single user mode before adding a login
how is it possible to scrip this? there is no&nbs
View Complete Post