Why I Can Never Leave ORCSWeb as My Web Hosting Company

Some Background and Getting Started Last weekend, a relatively new customer of mine moved their production hosting from a private dedicated server running ASP.NET to ORCSWeb cloud hosting.  They were running SqlServer 2000 and Windows Server 2003. We moved them to Microsoft Windows 2008 and Sqlserver 2008.  These kind of moves of productions servers always make me very nervous.  It seems like even though we make list after list, check the lists twice, test moving the SqlServer databases, etc., something always seems to go wrong.  In this case, their SqlServer database is 50Gig so that adds a little interest also. The moved started at 8PM eastern time.  Everything seemed to be going smoothly until I actually tried … Continue Reading

Entity Framework CodeFirst Important Tip For SQL Execution Efficiency

  Introduction   I’ve now been using Microsoft’s Entity Framework CodeFirst for a month or two and am very impressed with how easily it is to access data in a type safe way.  I also have noticed that I need to be extra careful about how I form my LINQ or I can accidentally cause the Sql Server to do tons of extra work (tons meaning lots, not actually tons). I’ll basically explain this with actual code snippets to demonstrate my point and help you understand what I’m talking about. Let’s say you have a set of classes representing your model that basically have a master record and an associated detail record that contains an reference to a table that hold images.  That is, basically, something like this:   … Continue Reading

Tip for Using SQLServer To Count By Alpha Names in a list


  So, this is not a big tip, but worth at least 10 minutes to figure it out on your own.  Here is to saving you 10 minutes:   SELECT LEFT (userlastname, 1) as alpha, count(id)FROM attendeesWHERE id IN ( SELECT attendeesid FROM AttendeesCodeCampYear WHERE codecampyearid = 6 )GROUP BY LEFT (userlastname, 1)OORDER BY LEFT (userlastname, 1) It’s pretty self explanatory.  Our case is we have two tables that we track code camp attendees.  One is the master list, and the other is a detail by year.  (6 is this year)   … Continue Reading

A Quick Tip On How To Ignore Time When Querying From SqlServer

Seems like this comes up a lot so I thought I’d blog about a clean way I found to do this from a StackOverflow article.  Basically, the problem is if you have a bunch of Sql records that have date and times in them (not 00:00:00 for time), using Microsoft’s SqlServer.  You may want to query all records that are on a certain date.  You can certainly for a query that looks like:   SELECT * FROM VolunteerJobs WHERE JobStartTime >='08-01-2008' AND JobStartTime<='08-14-2008 23:59:59.996' However, this feels a little awkward.  A better way that I plan on using is:   SELECT *FROM VolunteerJobWHERE DateAdd (day, datediff(day, 0, JobStartTime), 0) = '2010-10-09' Somehow, it … Continue Reading


Get every new post delivered to your Inbox

Join other followers: