SQL Server 2014 CTP1 Released

I hope you got plenty of use out of your SQL Server 2012 because SQL Server 2014 CTP1 has been released. You can dowload a trial here.


Performance is the first word mentioned in the improvements. Following that availability and reliability are next on the list but the interesting thing to me is disaster recovery since I’ve been chatting about it recently. It looks like you can backup your databases on Azure and then recover from there in the event of a disaster.

Next of interest to me is the in-memory OLTP which would give you great performance without installing any add-ons.

Tagged with:
Posted in Development

Microsoft Access DDL Types

When you are scripting data changes in Microsoft Access databases you may need to create temporary tables in order to update the data. This requires using DDL statements like CREATE TABLE. I usually need to lookup the field types since it doesn’t happen very often. Here is a table of types that you can use.

Desired Type DDL Syntax
Text TEXT(50)
AutoNumber COUNTER
ReplicaID GUID
Binary BINARY(50)

I got these types from the following Microsoft Support article.


Tagged with: ,
Posted in Development

Linq Query with Multiple Order Fields in Method Syntax

Ordering your sequences is simple using comprehension syntax with your Linq queries, but what if you want to use method syntax?

Here is a simple example with multiple fields in the order by statement.

var movies = from m in Movies
orderby m.CategoryID, m.Name
select m;

Now to accomplish the same thing in method syntax you just use apply a second ordering method like so.

var movies = db.Movies.Orderby(c => c.Category).ThenBy(n => n.Name);

Here is where I found an example for this on stackoverflow.


Tagged with:
Posted in Development

Generating Properties Using the prop Snippet in Visual Studio 2013

Saw a very cool way to generate properties in C# code from the //build conference, just by typing the word prop, but I didn’t know what key to press after the typing prop. I tried TAB and ENTER but they didn’t work. Turns out that you have to type TAB + TAB to get it to work. That is press TAB twice.

See here:


Tagged with: ,
Posted in Development

Visual Studio 2013 Preview Available for Download

Visual Studio 2013 Preview is now available for download. You can download it from here.


You might as well get the Ultimate version for now to try it out although you may need to uninstall and reinstall if you need to switch to Premium later. The express version may be useful as an alternative.

Tagged with:
Posted in Development

Reading XML using PowerShell

Stumbled across a very simple way to read an XML document using Powershell. This is so simple and concise. You just get the content and convert it to an XML object.

 [xml]$books = Get-Content C:\Books.XML 


Thanks to The Scripting Guy.


Tagged with: ,
Posted in Development

Consuming JSON from External Sources using Javascript

First you need a handy function to do the GET request.

function httpGet(theUrl) {
var xmlHttp = new XMLHttpRequest();
xmlHttp.open("GET", theUrl, false);
return xmlHttp.responseText;

Next you simply evaluate the text.

var jsonstring = httpGet("http://data.gc.ca/data/api/...");
var jsonvalue = eval("(" + jsonstring + ")");

Then you access the properties and place them on your page.

document.getElementById("placeholder").innerHTML = jsonvalue.help;

For more information here is an introduction to JSON.

Tagged with:
Posted in Development