Skip to main content

Posts

Showing posts from April, 2011

Google Search

Custom Search

Live Search

Yahoo Search


Search the web Search this site

Database Not Accessible

Recently after restoring a database backup which I got from another server I repeatedly encountered an error when logged in using a user who is given permission. But when ‘sa’ account is used I could work with the database without any problem.The error message was “The database DATABASE NAME is not accessible. (ObjectExplorer)” which was not helpful since it didn’t give any clue to figure out the issue.Later I found that the issue is because the user in the restored database is not properly mapped to the user in the new server and the resolution for this is to run the stored procedure sp_change_users_login to correct the orphaned user.sp_change_users_login 'update_one', 'USER', 'LOGIN' – Links the given user in the current database to the specified login. sp_change_users_login 'auto_fix', 'USER' – Links the given user in the current database to the login having the same name in the current server. After running this you will be able to access th…

Menu Overlapping with Report

If you had lengthier menus in you ASP.Net application and had used report viewer control you may have faced the problem of report and menu overlapping when ever the report is loaded with data. For example in my sample application it appeared as below.To correct this behavior you need to set the z-index for menu and report viewer using CSS class property. For this I have used the following CSS classes in the Style.CSS./* CSS Class for the Menu. */div.menu{ padding: 4px0px4px8px; } /* CSS Class for a Menu Item. */div.menuul{ list-style: none; margin: 0px; padding: 0px; width: auto; z-index: 1; /* Setting the control to appear on top of level 0 controls for e.g. report viewer. */} /* CSS Class for the Report Viewer. */.report{ z-index: 0; /* Setting the control to appear below the level 1 controls for e.g. menu items. */} To apply the CSS use a code similar to following.Appling CSS Class to menu in master page.<asp:MenuID="NavigationMenu"runat="server"CssClass=&quo…