Having Trouble Scripting SQL Tables Containing nvarchar(max) fields

Have you trying to script tables in your SQL2005 or 2008 database and you receive this error?

Column projectDescription in object [TABLENAME] contains type NVarCharMax, which is not supported in the target server version, SQL Server 2000. (Microsoft.SqlServer.Smo)

This error is caused by an incorrect scripting option in Microsoft SQL Server Management Studio being set to a version prior to 2005.

Obviously, to use the nVarCharMax field type the compatibility mode on the database needs to be 90 or 100, which is SQL 2005 and 2008.  You can easily check this via script (like below) or the Properties > Options screen on the database properties.

SELECT compatibility_level from sys.databases WHERE name='[MYDATABASE]'

To correct the error caused by the table creation; using Microsoft SQL Server Management Studio, go to TOOLS menu, then OPTIONS.  Expand “SQL Server Object Explorer”, then select “Scripting”.  You should see a screen like the example below (SQL2008).  Simply update the “Script for server version” to the appropriate setting, then try scripting your table again.

Simple, Reusable jQuery AJAX Dialog

While working on a project recently, I needed a simple way of reusing a jQuery ajax dialog. The problem with the default jQuery UI dialog is that when it is closed, it is destroyed, making it unusable again.  I wanted a way to basically pass any URL to it and have it load in the dialog.

There are lots of plugins to accomplish this, but here is a dead simple way. Just surround the dialog div with a containing div (id=dialogcontainer), and recreate the dialog div (id= dialog) on each call.  The URL is passed via the value attribute.

<link type="text/css" href="themes/base/ui.all.css" rel="stylesheet" />
<script type="text/javascript" src="jquery-1.3.2.js"></script>
<script type="text/javascript" src="ui/ui.core.js"></script>
<script type="text/javascript" src="ui/ui.draggable.js"></script>
<script type="text/javascript" src="ui/ui.resizable.js"></script>
<script type="text/javascript" src="ui/ui.dialog.js"></script>
<script type="text/javascript" src="external/bgiframe/jquery.bgiframe.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	$(".ajaxdialog").click(function () {
	$("#dialog").destroy;
	$("#dialogcontainer").html("<div id="dialog"></div>");
	$("#dialog").load($(this).attr("value")+" form");
	$("#dialog").dialog({
		bgiframe: true,
		height: 400,
		width: 600,
		title:$(this).attr("title"),
		modal: true
	});
});
</script>
<div id="dialogcontainer"></div>
<h1>Reusable Ajax Dialog using jQuery</h1>
<div class="ajaxdialog" value="dialog/page1.aspx" title="Dialog Title1">Reusable Ajax Dialog 1</div>
<div class="ajaxdialog" value="dialog/page2.aspx" title="Dialog Title2">Reusable Ajax Dialog 1</div>
<div class="ajaxdialog" value="dialog/page3.aspx" title="Dialog Title3">Reusable Ajax Dialog 1</div>
<div class="ajaxdialog" value="dialog/page4.aspx" title="Dialog Title4">Reusable Ajax Dialog 1</div>

Wanna Do DC like We Did? Here is my Itinerary

I’ve been asked for my “DC Itinerary” by a couple of people now.  Each wondering how the hell I fit so much in.  So I decided to summarize that portion of the trip. (I’ll write up the North Carolina portion later).
Times are approximate and all prices shown are for a family of four.  Metro prices are not shown, but I purchased everyone a $15 card and we had about $1.90 left over on each.

Day 1

Day 2
Day 3
Day 4
Day 5
  • 9:30AM - Free Breakfast at Hotel
  • 11:00AM – Check out, $728
  • 12:00PM – Lunch in Springfield, $30
  • 1:30PM – Check in to AutoTrain, $422
    (includes the price of car)
  • 4:30PM – Head home…
Tips
  • Price at Hampton (and most other DC hotels) double Sun-Thur, plan accordingly
  • Pickup SmartTrip cards for the metro at any CVS. $10 includes $5 credit.  Add another $10 the first night when there are no lines at the kiosks in the stations. The card costs $5, but think of it as a souvenir for the kids. There is a CVS one block away from the Hampton Inn
  • Do not purchase DC bus tours online.  They are readily available in Union Station and MUCH cheaper than online.
  • Avoid eating in the museums.  The prices are outrageous. I knew this but couldn’t avoid it on one day.
  • If you can, plan for more time a the Holocaust Memorial than I did.  You’ll need it.

Quickly Generate a CRcode from an URL with this Bookmarklet

Do you ever find yourself right in the middle of reading an article online, when you have to walk away from your desk?  Wouldn’t it be nice if you could quickly transfer the URL to your iPhone or Android?  Try this simple tip.

Create a Bookmark with the following bookmarklet as the URL:

javascript:(function(){location.href='http://chart.apis.google.com/
chart?chs=150x150&amp;cht=qr&amp;chl='+
encodeURIComponent(window.location.href)})()

This bookmarklet will take the current URL you are viewing and convert it to a CRcode you can quickly scan with your phone, using Google’s Charting API.

Enjoy!

The Challenger Disaster and Twelve Year Old Me

Twenty-four years ago today, the Space Shuttle Challenger exploded in the skies over my home… For as long as I can remember, the shuttle program has been a way of life for me and my family. The Apollo missions to the moon ended ten months before I was born, and I was too young to remember the Apollo-Soyuz mission of Apollo 18. For me, the United States manned-spaceflight is, the Space Shuttle. My family has been involved in the US space program from basically, day one. My grandfather worked at Cape Kennedy during its earliest days. My father was the first person to have 30+ consecutive years at Kennedy Space Center. I have now worked in support of the space program for over nine years. In 1986, my father supervised the shuttle astronaut van and other large support equipment.

At the time we were not only bound to the shuttle program by our family’s livelihood. This particular mission was being utilized as the President Reagan’s catalyst to inspire kids everywhere to excel in math and science. There were handouts in classes, posters, and even TVs (unheard of at the time) being placed in classrooms around the country, to get kids involved and interested.

At 12 years old in 7th grade, I was the poster child for the target demographic that the “Teacher-in-Space” project was designed to relate to. It was like a perfect storm me and the kids around me in Brevard county.

“I still remember the cold that morning, it was bitter walking to school.”

When the launch was announced on the intercom, I was in Mr. Walker’s 5th period Algebra class, at Clearlake Middle School in Cocoa. His classroom had posters covering 90% of this windows, to keep students focused on the board. We all tried to see the launch as best we what we could out of the poster covered windows. I had just found a quarter-inch gap between two, when I saw it. I remember thinking “that doesn’t look normal.”

Moments after the launch we began heading to lunch, it was there when the reality of the situation really began hitting people. The downward spirals from the solid rocket boosters burning out was a tell-tale sign something definitely was not right. As the day when on, school administrators passed on more and more information to the students.

At home, this was the first time in my life that I had a “watch all the news you can” day. Ones like what would follow all to frequently later in life when watching events like the Oklahoma City bombing, Branch Davidians compound raid, 9/11 attacks or Operation Desert Storm unfolding.

A couple of days after the disaster, I drew a picture of the launch plume as I remembered seeing it so I would never forget. But the image of seeing the explosion through that ¼ inch gap in the window is so ingrained in my memories, it might as well of happened yesterday. Forgetting it is not ever likely.

I still have the drawing, in my office today.

Teacher in Space Project
http://en.wikipedia.org/wiki/Teacher_in_Space_Project

My Struggles as a INTJ Personality Type

Hi.  My name is Joe and I’m a INTJ personality-type.   I am Introverted, Intuitive, Thinking, and Judging.  Here is where you say, ”HI JOE!”

My entire life I’ve felt different.  Especially in social situations.  I would see those extroverts just jumping into situations without forethought, and wonder how on earth they did it.  In my mid twenties (and a quite a few times since) I learned why.  By learning my Myers-Briggs personality type.

Each and every time I have taken the MBTI Personality test, I’ve landed squarely in the top right corner.  A place shared with only 1-2% of the population.

The first time I read the results, it was creepy.  It was like the document was actually written about me, personally.  It described me perfectly.  But reading it helped me become content with myself.  Those “flaws” that I’ve always had, were definable and fit into a big picture….and INTJs like big pictures.

I have truly benefited and exploited my INTJ attributes since then.  But there is not a day that goes by that I kind of wish I was a little more “center” on the personality-type chart.   Certain components of life, just clash with me and my personality type and it is a daily struggle to get through or past them.

Small Talk

Throughout my life, I’ve continuously struggled with small-talk. I always wondered how people could gain such enjoyment out of conversations, where in my eyes, none of its participants have anticipated gains from.

A discussion topic about something that either I can gain from, or I can add to usually keeps my attention.  But I find it difficult to join the conversation, unless the topic is predefined.  Those other conversations about weather, sports teams, what’s-in-front-of-me-at-this-moment, or gossip, make my skin crawl and I often secretly make fists in frustration during meetings.

…INTJs do not readily grasp the social rituals; for instance, they tend to have little patience and less understanding of such things as small talk and flirtation….making them easy to misread and understand
INTJ Profile [TypeLogic]

INTJs are big picture types;  we always look at the total situation.  So, I often feel that pointless conversations wasted on me, are simply multiplied by the number of people involved.  I also think they see and feel the same way.  So the larger the group participating in a non-goal orientated discussion, the more uncomfortable I feel.

I work in an organization of roughly 30-40 people.  Being military related means that there are quite a few “office functions” beyond that of a normal office.  For instance, commander’s calls, promotions ceremonies, formal military award ceremonies, etc.

As a veteran, I feel I should attend the “ceremonies”, out of respect.  But as an INTJ personality type, I (normally) avoid the small-talk after parties.  I know in my common sense side of brain that there can be value gained, but that is not how me and other INTJs think.

In my analytical mind, I weigh the time spent on fruitless conversation verses that spent on development projects.  Goal orientated project time always wins.

Networking

How to network without uncomfortable small talk?  Welcome to my world.  With an entrepreneur spirit, the drive to get things done, and the tools to do it, networking is truly my Achilles heal.

While online social networks have greatly aided INTJs like myself by allowing us to “filter” the small talk and pick and choose our conversations, it does not replace real handshake networking.

To startup a discussion with someone, without knowing what value-added I can offer that person is a 20ft hurdle for me.  Without this, I feel like I will be perceived as only wanting something from them, which is not networking.

I truly envy the CEO, bloggers, co-workers who can find a common opener to begin a discussion, without feeling like it is all about “them”.

Television and Video Games

When I was a kid we had an Atari 2600, and I had a Apple IIc, both of which had a ton of games.  During that time, and no time since have I ever really enjoyed playing the games others enjoy.  I’ve always viewed them as working toward a goal which would, basically, self-destruct once you’ve met it.

I had more enjoyment out of coding my own games, than playing them.  The coding had an end goal with reward; a finished product that could later be improved upon.  Once you’ve played and won Donkey Kong, you done…you’ve gained nothing.

The same goes for television.  I’ve enjoyed sitcoms throughout my life, because I’ve always viewed them as 30 minute nuggets of entertainment, without any commitment or anticipated gains.  I have always enjoyed TV shows like Seinfeld, The Office and 30 Rock.  A half hour, each of which (for the most part) can be enjoyed without commitment to an entire season.

Dramas on the other hand, I’ve never enjoyed (with the exception of West Wing, in which I constantly learned stuff).  Shows like Lost, require too much commitment without reward.  Once they reveal that everyone on Lost is from outer space, what will you have gained?

I would much rather watch Biography, Nova, Current, or even Jeopardy.  I gain something from these programs; knowledge.  I feel as though my time is not wasted.

Closing

Telling an INTJ to just get over it, is about the same as telling people in depression to cheer up, or people with migraines to take an aspirin.  We are hardwired this way, and can not just change.   We can try to be more like “normal” people, we simply are not, and it will always feel like a square peg in a round hole.

It is best that we leverage the strengths of our personality, and try to build mental bridges to the other personality types.  I will never be the “life of the party”, at least without a lot of alcohol.  And I accept that.  But I will be the one formulating the strategic plan for the best layout of food in kitchen to facilitate the best traffic flow.  Accept it.

Fellow INTJs - Lance Armstrong, Peter Jennings, Colin Powell, John F. Kennedy, Michelle Obama, Susan B. Anthony