Kierkegaard on Guts

 

“The thing that cowardice fears most is decision.”

– Soren Kierkegaard (1813–1855)

Danish philosopher and writer

Sometimes, if we don’t have success after repeated attempts to do something, we can lose confidence and eventually give up trying. It’s called “learned helplessness” (we learn to be helpless).

Sales check: Any areas where you and your team have stopped trying (or try, but with little commitment) because prior repeated failures and/ or a perceived inability to succeed has trained you not to try? In prospecting and customer contact efforts? In motivating and improving team attitudes and cooperation? With customer care improvement initiatives?

If so, what can you start doing today to minimize any “learned helplessness” that may have set in?

King on Staying With It

 

“If you can’t fly, run. If you can’t run, walk. If you can’t walk, crawl. But by all means, keep moving.

– Martin Luther King, Jr. (1929–1968)
American civil rights leader
Nobel Peace Prize winner

Sometimes, if we don’t have success after repeated attempts to do something, we can lose confidence and eventually give up trying. It’s called “learned helplessness” (we learn to be helpless).

Sales check: Any areas where you and your team have stopped trying (or try, but with little commitment) because prior repeated failures and/ or a perceived inability to succeed has trained you not to try? In prospecting and customer contact efforts? In motivating and improving team attitudes and cooperation? With customer care improvement initiatives?

If so, what can you start doing today to minimize any “learned helplessness” that may have set in?

Another thought on embracing the objections of your prospects and customers…

Right now and over the next several weeks, position in your mind the regular objections you hear as not only an inevitable step to bringing in more business, but also a positive step. Objections confirm a level of need or desire for your product or service and help you better determine the next steps you should take in a sales process. For the prospect, it’s your responses to the objections that help validate or support their buying decision.

This is the reason the responses to your top objections (those you and your team hear most often) must be planned and prepared with a professional’s level of attention.

The keys… Appreciate. Validate. Be direct.

The SqlGeometry with Microsoft SQL Server

I came across a curious error earlier today when attempting to use a SqlDataReader to read a column of geometry data from a SQL Server table:

System.InvalidCastException: Unable to cast object of type ‘Microsoft.SqlServer.Types.SqlGeometry’ to type ‘Microsoft.SqlServer.Types.SqlGeometry’

SqlGeometry to SqlGeometry… you’d think that would be a pretty easy cast, wouldn’t you? It turns out that this is a problem caused by a conflict between the spatial libraries used in SQL Server Denali compared to that in 2008/R2, and you’ll get this error depending on which version of Microsoft.SqlServer.Types.dll you use, and how you try to access geometry or geography columns from a datareader:

[php]
while (dataReader.Read())
{
// This works in SQL Server 2008/R2, but errors with Denali
SqlGeometry g = (SqlGeometry)dataReader.GetValue(0);

// This works in SQL Server 2008/R2, but errors with Denali
SqlGeometry g = (SqlGeometry)dataReader["GeomCol"];

// This works in Denali, but not in SQL Server 2008/R2
SqlGeometry g = SqlGeometry.Deserialize(reader.GetSqlBytes(0));

// This works in Sql Server 2008/R2/Denali
SqlGeometry g = new SqlGeometry();
g.Read(new BinaryReader(reader.GetSqlBytes(0).Stream));
}
[/php]

After a bit of digging around, it appears that using GetValue or square brackets notation [] to access a geometry/geography field in a SqlDataReader is hard-coded to load the 10.0 (SQL Server 2008) version of the Microsoft.SqlServer.Types library.

If you’ve got side-by-side installations of both SQL Server 2008/R2 and Denali (as I have), and try to reference the 11.0 (Denali) version of Microsoft.SqlServer.Types, you’ll therefore get an assembly mismatch when both versions of the library are loaded, which causes the slightly unhelpful error listed at the top of this post. Even if you’ve only got Denali installed, your code may still try to reference a (non-existent) 2008/R2 version of the Microsoft.SqlServer.Types.dll library, so you’ll get a different error instead:

Could not load file or assembly ‘Microsoft.SqlServer.Types, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91′ or one of its dependencies. The system cannot find the file specified.

The simplest way to resolve these errors is by changing the way you reference any geography/geometry (and, I imagine, hierarchyid) columns from your DataReader, as in the code example above. Alternatively, you can set up an assembly redirection in the application configuration file as explained here (about halfway down), which will allow you to correctly target the Denali version.

As per the What’s new in SQL Server Denali whitepaper, “… side-by-side installations of SQL Server Code-Named “Denali” CTP1 and CTP3 are not supported with existing SQL Server 2008 installations …”, so perhaps I only have myself to blame for this. Interestingly though, the person who raised this MS Connect issue, says that they have experienced exactly the same problem on a clean install of Denali CTP3. The response from Microsoft suggests that this may be due to older versions of the library being packaged with Visual Studio 2010, and also confirms that the problem will not be resolved prior to RTM of SQL Server Denali.

Strangely, I encountered another curious error a few months ago concerning version conflicts of Microsoft.SqlServer.Types. My CTP3 Management Studio Spatial Results tab does not plot curved geometries (selecting a CircularString or the result of BufferWithCurves etc. just produces a blank pane). I had originally assumed that, since this was only a CTP release, this feature had simply not been added yet. It turns out that curved geometries are supported in SSMS CTP3 Spatial Results tab but, if you have side-by-side SQL Server 2008 and Denali, this can corrupt this feature. I guess the reason is similar – that SSMS is somehow attempting to load the SQL Server 2008/R2 version of Microsoft.SqlServer.Types, which, of course, doesn’t support curved geometries.