Using SQLDMO

C

Craig G

i am currently building a small user maintenace system which works across
different SQL db's and servers.

for a logon screen i am using SQLDMO to get a list of all SQLServers on
network, once logged on this then populates a list of db's on that SQL
server. by clicking OK i more or less build a connection string for the
database that the user wishes to maintain.

one of the maintenace functions is to be able to change the user passwords
within the selected db, but i was wondering is there a way via SQLDMO that i
can get a list of all Users for that DB, so that i can then populate a
listbox with all the users

Cheers,
Craig
 
G

Guest

You could use the system Stored Proc sp_password

Syntax
sp_password [ [ @old = ] 'old_password' , ]
{ [ @new =] 'new_password' }
[ , [ @loginame = ] 'login' ]

Syntax and use can be found in the Books Online.

Glenn.
 
C

Craig G

yeah i was gonna be using the sp_password to change the passwords anyhow

but what i really wanted was to return a list of users so that rather than
type the username in, they can select a username then change the password

Cheers,
Craig

Glenn Wilson said:
You could use the system Stored Proc sp_password

Syntax
sp_password [ [ @old = ] 'old_password' , ]
{ [ @new =] 'new_password' }
[ , [ @loginame = ] 'login' ]

Syntax and use can be found in the Books Online.

Glenn.

Craig G said:
i am currently building a small user maintenace system which works across
different SQL db's and servers.

for a logon screen i am using SQLDMO to get a list of all SQLServers on
network, once logged on this then populates a list of db's on that SQL
server. by clicking OK i more or less build a connection string for the
database that the user wishes to maintain.

one of the maintenace functions is to be able to change the user passwords
within the selected db, but i was wondering is there a way via SQLDMO that i
can get a list of all Users for that DB, so that i can then populate a
listbox with all the users

Cheers,
Craig
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top