Search Results

Search found 3 results on 1 pages for 'abep'.

Page 1/1 | 1 

  • Connection to SQL Server 2008 R2 Database Server is SLOW

    - by AbeP
    The database server is a VM running SQL Server 2008 R2 on top of Windows Server 2012, 24GB RAM allocated and 2TB of disk space. Overall, the database connections are very slow and one thing that stands out is that the connection to the database server via SSMS takes 5-10 seconds. On other much less powerful servers, it takes 1-2 seconds. The VM is technically way more powerful than other machines, but the connection to the server is too slow. So, my guess is the issue is network related, but any clues on where I should be looking? Thanks!

    Read the article

  • SQL Server WHERE Clause using Temporary Columns

    - by AbeP
    Hi all, I have the following query, which uses a CASE statement. Is there anyway to add into the where clause WHERE IsBusinessDayFinal = 0? without using a temporary table? thanks so much! SELECT ac.DateTimeValue, CASE WHEN pc.IsBusinessDay IS NOT NULL THEN pc.IsBusinessDay ELSE ac.IsBusinessDay END AS IsBusinessDayFinal, ac.FullYear, ac.MonthValue, ac.DayOfMonth, ac.DayOfWeek, ac.Week FROM [dbo].[AdminCalendar] ac LEFT JOIN [dbo].ProjectCalendar pc ON ac.DateTimeValue = pc.DateTimeValue AND pc.ProjectId = @projectId WHERE ac.DateTimeValue >= @startDate AND ac.DateTimeValue <= @finishDate;

    Read the article

  • How can I shared controller logic in ASP.NET MVC for 2 controllers, where they are overriden

    - by AbeP
    Hello, I am trying to implement user-friendly URLS, while keeping the existing routes, and was able to do so using the ActionName tag on top of my controller (http://stackoverflow.com/questions/436866/can-you-overload-controller-methods-in-asp-net-mvc) I have 2 controllers: ActionName("UserFriendlyProjectIndex")] public ActionResult Index(string projectName) { ... } public ActionResult Index(long id) { ... } Basically, what I am trying to do is I store the user-friendly URL in the database for each project. If the user enters the URL /Project/TopSecretProject/, the action UserFriendlyProjectIndex gets called. I do a database lookup and if everything checks out, I want to apply the exact same logic that is used in the Index action. I am basically trying to avoid writing duplicate code. I know I can separate the common logic into another method, but I wanted to see if there is a built-in way of doing this in ASP.NET MVC. Any suggestions? I tried the following and I go the View could not be found error message: [ActionName("UserFriendlyProjectIndex")] public ActionResult Index(string projectName) { var filteredProjectName = projectName.EscapeString().Trim(); if (string.IsNullOrEmpty(filteredProjectName)) return RedirectToAction("PageNotFound", "Error"); using (var db = new PIMPEntities()) { var project = db.Project.Where(p => p.UserFriendlyUrl == filteredProjectName).FirstOrDefault(); if (project == null) return RedirectToAction("PageNotFound", "Error"); return View(Index(project.ProjectId)); } } Here's the error message: The view 'UserFriendlyProjectIndex' or its master could not be found. The following locations were searched: ~/Views/Project/UserFriendlyProjectIndex.aspx ~/Views/Project/UserFriendlyProjectIndex.ascx ~/Views/Shared/UserFriendlyProjectIndex.aspx ~/Views/Shared/UserFriendlyProjectIndex.ascx Project\UserFriendlyProjectIndex.spark Shared\UserFriendlyProjectIndex.spark I am using the SparkViewEngine as the view engine and LINQ-to-Entities, if that helps. thank you!

    Read the article

1