Knowledge++ http://jasonfollas.com/blog/category/12.aspx Knowledge++ Posts with new things that I've learned en-US Jason Follas jason@jasonfollas.com Subtext Version 2.0.0.43 Knowledge++ [4] http://jasonfollas.com/blog/archive/2009/02/21/knowledge-4.aspx <p>I recently developed a spatially-aware .NET application that did not use SQL Server 2008 as the backend (this enterprise was still on SS2005, but we needed the spatial support in the application today). While the application worked properly on my laptop, it was a huge failboat when deployed to the server environment.</p> <p>I had previously posted that you can get the Microsoft.SqlServer.Types library from MS Downloads, but it turns out that this alone is not sufficient to allow your application to run. You also need to ensure that the SQL Server 2008 Native Client is also installed (regardless of whether you're accessing a SS2008 instance or not). <em><strong><font color="#ff0000">Update!</font> </strong>You actually don't... read below.</em></p> <p>Both the Types library and the Native Client can be downloaded from the following:</p> <p><font face="Arial"><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=228de03f-3b5a-428a-923f-58a033d316e1&DisplayLang=en">http://www.microsoft.com/downloads/details.aspx?FamilyID=228de03f-3b5a-428a-923f-58a033d316e1&DisplayLang=en</a></font></p> <p><em>My discovery source: <font face="Arial"><a href="https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=355402&wa=wsignin1.0">https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=355402&wa=wsignin1.0</a></font></em></p> <p><strong>UPDATE: </strong>Per <a href="http://blogs.msdn.com/isaac/default.aspx">Isaac Kunen</a> (in this blog post's comments as well as offline discussion), the missing component from the Types library is simply an updated version of the C Runtime. The fix of using the Native Client is a hack in this case because its MSI actually installs the updated CRT (which the MSI for the Types library should have done also - it's a goof that MS Downloads hasn't been updated with an updated version of the Types API after the above Connect feedback was answered...</p> <p>The Microsoft Visual C++ 2008 redistributable by itself can be downloaded from:</p> <p><font face="Arial"><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=A5C84275-3B97-4AB7-A40D-3802B2AF5FC2&displaylang=en">http://www.microsoft.com/downloads/details.aspx?FamilyID=A5C84275-3B97-4AB7-A40D-3802B2AF5FC2&displaylang=en</a></font></p> <p> </p><img src="http://jasonfollas.com/blog/aggbug/63.aspx" width="1" height="1" /> Jason Follas http://jasonfollas.com/blog/archive/2009/02/21/knowledge-4.aspx Sun, 22 Feb 2009 02:45:26 GMT http://jasonfollas.com/blog/archive/2009/02/21/knowledge-4.aspx#feedback 3 http://jasonfollas.com/blog/comments/commentRss/63.aspx http://jasonfollas.com/blog/services/trackbacks/63.aspx Knowledge++ [3] http://jasonfollas.com/blog/archive/2009/01/29/knowledge-3.aspx <p>When you write a query that SELECTs a SQL Server 2008 Spatial type, the returned result is a binary value. Without closely examining the bytes, I just assumed that this was WKB (Well-Known Binary).</p> <p>Well, as it turns out, the bytes that are returned are simply a serialized version of the .NET object (the UDT has a Write() method that it calls internally to serialize the object in binary). This is NOT directly compatible with WKB.</p> <p><em>My discovery source: <font face="Arial"><a href="http://social.msdn.microsoft.com/Forums/en-US/sqlspatial/thread/40ee9466-d7bf-4340-b295-53217ae5128e">http://social.msdn.microsoft.com/Forums/en-US/sqlspatial/thread/40ee9466-d7bf-4340-b295-53217ae5128e</a></font></em></p> <img src="http://jasonfollas.com/blog/aggbug/62.aspx" width="1" height="1" /> Jason Follas http://jasonfollas.com/blog/archive/2009/01/29/knowledge-3.aspx Thu, 29 Jan 2009 14:32:28 GMT http://jasonfollas.com/blog/archive/2009/01/29/knowledge-3.aspx#feedback http://jasonfollas.com/blog/comments/commentRss/62.aspx http://jasonfollas.com/blog/services/trackbacks/62.aspx Knowledge++ [2] http://jasonfollas.com/blog/archive/2009/01/16/knowledge-2.aspx <p>During one of the many discussions at CodeMash, I brought up the fact that deep beneath the city of Detroit (some 1200 feet below the surface) exists a very large salt mine that spans some 1500 acres and contains over 100 miles of roadways connecting a series of large excavated rooms. This salt deposit, formed hundreds of millions of years ago when a great salty sea evaporated, actually extends under most of Michigan and lower Ontario, as well as parts of Ohio and New York. A large operation in Cleveland, for instance, mines salt from equal depths below Lake Erie.</p> <p><font face="Arial"><em>My discovery sources: </em><a href="http://www.detroitsalt.com/home.htm"><em>http://www.detroitsalt.com/home.htm</em></a> <em>, <font face="Arial"><a href="http://www.saltinstitute.org/mich-1.html">http://www.saltinstitute.org/mich-1.html</a></font></em></font></p> <p> </p><img src="http://jasonfollas.com/blog/aggbug/61.aspx" width="1" height="1" /> Jason Follas http://jasonfollas.com/blog/archive/2009/01/16/knowledge-2.aspx Fri, 16 Jan 2009 05:00:00 GMT http://jasonfollas.com/blog/archive/2009/01/16/knowledge-2.aspx#feedback http://jasonfollas.com/blog/comments/commentRss/61.aspx http://jasonfollas.com/blog/services/trackbacks/61.aspx Knowledge++ [1] http://jasonfollas.com/blog/archive/2009/01/15/knowledge-1.aspx <p>The other day, my Zune refused to pause the music. The icon in the lower right would toggle between Play and Pause, but the music kept playing. Holding the Pause button for about a second would cause the Zune to go to sleep, but upon waking up (pressing Pause again), the symptom persisted.</p> <p>I needed to reboot my Zune, but didn't know how.</p> <p>The solution is to hold the "Back" button and "Up" at the same time for about a second. The screen will blank, and then the device will reboot. Problem solved.</p> <p><em>My discovery source: <font face="Arial"><a href="http://www.cliczune.com/2006/12/zune_tricks_reb.html">http://www.cliczune.com/2006/12/zune_tricks_reb.html</a></font></em></p><img src="http://jasonfollas.com/blog/aggbug/60.aspx" width="1" height="1" /> Jason Follas http://jasonfollas.com/blog/archive/2009/01/15/knowledge-1.aspx Thu, 15 Jan 2009 05:00:00 GMT http://jasonfollas.com/blog/archive/2009/01/15/knowledge-1.aspx#feedback http://jasonfollas.com/blog/comments/commentRss/60.aspx http://jasonfollas.com/blog/services/trackbacks/60.aspx Knowledge++ [0] http://jasonfollas.com/blog/archive/2009/01/14/knowledge-0.aspx <p>I'm constantly learning new things. I think it is human nature to do so. The sad thing is that a lot of what I learn either becomes trivialized or forgotten, so I don't appreciate that a discovery was made after the fact. </p> <p>I'd like to change that. I'd like to share my little eye-opening discoveries with whoever has the time to read about them. Thus, I've started a new category on this blog that I call "Knowledge++".</p> <p>Today's discovery involves ORACLE... you know, the <em>other</em> RDBMS out there in the wild. :-)</p> <p>My current project uses an Oracle 10g backend. The other day, I realized that PL/SQL does not have a RIGHT() function, as T-SQL does. The alternative method used by Oracle to return the rightmost characters of a string is to use the SUBSTR() function, specifying a <em>negative<strong> </strong></em>number for the 'length' parameter.</p> <p>SUBSTR('123456789', -3) would give you '789'!</p> <p><em>My discovery source: <font face="Arial"><a href="http://www.ispirer.com/doc/sqlways38/Output/SQLWays-1-069.html">http://www.ispirer.com/doc/sqlways38/Output/SQLWays-1-069.html</a></font></em></p> <p> </p><img src="http://jasonfollas.com/blog/aggbug/59.aspx" width="1" height="1" /> Jason Follas http://jasonfollas.com/blog/archive/2009/01/14/knowledge-0.aspx Thu, 15 Jan 2009 01:25:34 GMT http://jasonfollas.com/blog/archive/2009/01/14/knowledge-0.aspx#feedback http://jasonfollas.com/blog/comments/commentRss/59.aspx http://jasonfollas.com/blog/services/trackbacks/59.aspx