Posts

Deleting an Email Account on the Windows Phone 7

I don’t think that it is completely obvious how to delete an email account on the Windows Phone 7, so I am writing this quick blog post to describe how to do it. Click on the Windows button to get to the start screen (with the tiles) Swipe right to get to the applications list Swipe down until you find the settings icon. Tap on Settings to enter settings. Choose email & accounts Find the email account that you want to delete. Press down on the email account you want to delete until the secondary menu appears. There will be an option to delete , tap it. {6230289B-5BEE-409e-932A-2F01FA407A92}

A Smart Overloading of a Stored Procedure Call by Mining COALesce.

Often you have a table where different columns needs to be updated by different calls.  Traditionally, you wrote a stored procedure for every variation which can result in a mountain of code (increases your LOC/hr but drives maintenance cost up more!)   IF you can eliminate NULL as being a valid value (use ‘’ instead?) then you can reduce everything to a single stored procedure as illustrated below.   Create proc harvest.P_UpsertEvent @ID uniqueidentifier = null , @ParentID uniqueidentifier = null , @ConsolidationSequenceNo bigint = null , @Level smallint = null , @EventFulId varchar ( 50 ) = null , @VenueID uniqueidentifier = null , @Title nvarchar ( 120 ) = null , @Text nvarchar ( max ) = null , @Html nvarchar ( max ) = null , @StartAt datetime = null , @EndAt datetime = null , @ExtendedXml xml = null AS ...

Sql Upgrade Strategies

In my prior post I described how you can identify the different between a prior production database and a developer’s evolution of the database. You could make the developer responsible for developing the scripts but that is not always the best use of such a resource (do you make the developer responsible for writing all of the automated unit tests for their code and thus do not need testing resources? The appropriate best use of a developer issue is similar). Whether the developer’s does it, the database developer does it or a contracted resource does it – you end up with a batch of TSQL for each ‘upgrade’ (there may be dozens of developer’s upgrades in a product release cycle). This post looks at the management issue.   We have the TSQL to go from Prod –> Dev We want to apply it to some other Prod system   The basic pattern is a series of update files and a console application that reads the TSQL in , configuration information and then apply the informatio...

Startups and Sql Server Databases

Image
Often a startup tosses out a database to get a web site up or product out of the door. This is reasonable when there is neither the time(-to-market) nor the money (for SQL Data Modelers and developers).   For a web site there is usually one of two patterns of evolution: Use the production database for development. There’s no problem of matching database to next generation code base. Side-effects can be horrible from miscoding or security breaches. Use a clone of the production database and then evolve it with the next generation code. For a product database, 2. above is the typical option. We will consider this type of option alone in this post. The second pattern we need to look at is a non-issue for a one-man development shop, but arises with there are multiple developers: A single shared development database Any problems impacts the entire development team Each developer has their own development database Each devel...

Finding out what changed between two versions of a SQL Server Database

This is just a quick note showing how you can compare the structure of two databases  easily. These queries will spell out what (and their types) -- One way Select name,type from MyDataBase_dev.sys.objects EXCEPT Select name,type from MyDataBase.sys.objects -- reverse direction Select name,type from MyDataBase.sys.objects EXCEPT Select name,type from MyDataBase_dev.sys.objects The next item to check is usually columns, which follows a similar pattern:   Select Table_Name,Column_name from MyDataBase.Information_Schema.Columns EXCEPT Select Table_Name,Column_name from MyDataBase_Dev.Information_Schema.Columns Select Table_Name,Column_name from MyDataBase_Dev.Information_Schema.Columns EXCEPT Select Table_Name,Column_name from MyDataBase.Information_Schema.Columns Many developers do not know about the very useful EXCEPT operator which excludes from one SELECT all matches in another SELECT. You can do this for the rest of the system cat...

Writing Web Pages for a Client That You Can’t Test

Every time I get a C# exception on my ASP.NET web site running in Windows Azure, I have my web site code send me an email; this email includes the call stack, path information, and user agent string. I can use these email to find the problems with the code that caused the error. For a long time I have been ignoring the email (about 50 a day) and letting them stack up – being too busy with other projects. Lately, I have resolved to clean up all the code, so that I get less email and reduce the bugs in the web site. I thought this would lead to a better user experience for people visiting the site.   My typical process is to read the call stack, look at the path information and try to reproduce the issue to gain insight into how I have to fix it. Basically, a debugging process that I have in my toolkit no matter what the environment I am programming. To get started I make sure that I am running the same browser that the user was using, be that Firefox, Internet Explorer or Goog...

The sales pitch to developers …

Last night I attended the local Linux Group meeting with a presentation on  a MS Access/OO.Base to Drupal presentation described as:   “Most people think of drupal as a website framework system. However, it can also serve effectively as a replacement to the forms/reports/tables system utilized by access and base. (as well as many other things, but we won't discuss that formally tonight) No prior knowledge of Drupal is required, and for those who do understand drupal, we will go through using cck and views, as well as a few other modules to develop a replacement for a small access database.” Since this is a Windows Blog, it appears to be off target – however since it’s a emotionally-detached example to illustrate what is also seen with Windows stuff. As a FYI, I grew up on CP/M and ran Mark Williams Unix ( Coherent ) in the mid 1980’s, we have three Linux boxes in the house.   The first  thing that I struck me during the talk was that the speaker was l...