DMO to get Logins with NULL passwords

  • How can I use DMO to determine which Logins have NULL passwords?

    The sql statement is

    select name, password from dbname..syslogins where password is NULL.

    Thanks

  • You could use the queryresults. Better off with an ADO query.

    Steve Jones

    steve@dkranch.net

  • I agree it may have been better, but our entire application uses the management capabilities of DMO already to do everything else. This feature is all that is lacking.

    If there is no other way to do it, we will use ADO for this 1 operation, but for maintenance reasons, it's better to stick with 1 API.

    Thanks though.

  • I dont think you can get passwords from the login object in DMO, you can just set passwords. You can definitely run the query using the executeimmediate which will return a queryresults object (essentially an array). It shouldnt be a lot of records so probably not hard to handle.

    Andy

  • Thanks for your ideas and replies.

    It looks like I don't have many options.

    Getting the recordset will have to do it.

    Thanks again

    Ken

  • Not sure I explained it well - you can execute the query and return it via DMO to a queryresults object. You dont HAVE to use ADO at all.

    Andy

  • Andy..

    I had searched the documentation for the ExecuteImmediate command and got the specifics.

    Thanks again for helping me out.

    Ken

  • No problem at all! We don't get enough DMO topics, was nice to have one!

    Andy

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply