Home Forums Microsoft Access Microsoft Access VBA - Access to the remote server is denied because no login mapping exists RE: VBA - Access to the remote server is denied because no login mapping exists

  • khurmi.navpreet (8/15/2013)- Check if the login is connected to the user in the database: use {db_name};exec sp_change_users_login 'Report' - Executed this command but it gave me only 2 usernames with UserID's.

    The 2 usernames with the UserID's indicate that a connection between the user and the login is lost. The connection is lost due to a mismatch between the UserID's of the Login and the corresponding User. Most probably a database restore is executed or the login is deleted and re-created.

    You can use the following command for each listed username to re-connect them again:

    use {db_name};exec sp_change_users_login 'Auto_fix', '{username}'

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **