Temporarily Disable All T-SQL Table Constraints in a Database

After generating a set of scripts to import production data to a local development database, I ran into an issue with constraints blocking the inserts (this is on a fresh database structure). To get around the issue, execute this T-SQL command on your database:


You can now insert data without constraints blocking the action. Once you’ve finished the import, you can re-enable all constraints using this command:


And please, don’t use this on a production database! Development or testing only!

One more tip: if you see the following error, you’ve most likely inserted data that violates one of your constraints. Check to make sure all of your inserts have succeeded.

The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_YOUR_FOREIGN_KEY_CONSTRAINT".

Facebook Email Addresses Now (Mostly) Defunct

A few years ago Facebook launched its anti-email campaign, saying that the future of messaging is no longer email. As of today (for me at least), they are no longer pushing emails sent to addresses into their messaging system.


Either they’ve achieved their goal of their messaging system being ubiquitous, or they finally decided to give up on the integration.

Toy Hack: Kidoozie Deluxe Build-a-Road With Elevator

One of the best things about being a parent? You get to play with some awesome kid-toys again! Seth received the a Kidoozie Build A Road X-Track set as a Christmas gift. We love building different tracks, finding different obstacles to integrate with the road, and just beings kids (at-heart, in my case).

Kidoozie Build A Road X-Track (

After having such a blast with that set, I decided to pick up the deluxe expansion from Amazon. However, while the set provided some cool additions, there was something about it that was bothering me: the multi-directional gates required manual intervention or you’d never reach the full track. Continue reading…

Deploy WordPress Using Git

With this site’s recent migration to Windows Azure, the true power of Git-based deployments has become very apparent. Being able to source control an entire WordPress site, including plugins, themes, configuration, and of course, WordPress itself, makes it very convenient to manage. Adding automatic deployments just sweetens the deal.

If you’re not running on Windows Azure, but still want to take advantage of Git-based deployments, it’s a relatively easy process to setup. I’ve tested this setup on multiple sites and it’s been working very well for me.

Continue reading…

Free Windows and IE Virtual Machines for Cross-Browser Testing

If you spend a lot of your time doing web development, then you’ll realize how important cross-browser testing is. Ensuring that your site looks and functions (mostly) the same across modern, or legacy, browsers is vital.

However, one of the most difficult browsers to test is Internet Explorer. This is largely due to its availability only on the Windows platform, as well as changes between major version numbers. Well, that all changes now thanks to an offering from Microsoft. Continue reading…

Page 3 of 2812345...1020...»
Copyright © 2006 – 2015, Brandon Martinez. All rights reserved. A Martinez Media site.