<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>all tech stuff</title>
        <link>http://geekswithblogs.net/influent1/category/6099.aspx</link>
        <description>SQL Server, C#, .Net, etc.</description>
        <language>en-US</language>
        <copyright>Alex Bransky</copyright>
        <managingEditor>alex18@rocketmail.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <item>
            <title>workspaces in sql mgmt studio</title>
            <link>http://geekswithblogs.net/influent1/archive/2009/07/01/133188.aspx</link>
            <description>How is it that you still can't save workspaces in SQL Server Management Studio as of version 2008?  It seems like such a simple thing to implement.  Quite often I create a bunch of different queries during a short period that are specific to a task I'm working on and that won't be needed once the task is completed, and rather than having to save each one it would be nice if I could just save a workspace file that knows which queries were open.&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=133188"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=133188" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/influent1/aggbug/133188.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Alex Bransky</dc:creator>
            <guid>http://geekswithblogs.net/influent1/archive/2009/07/01/133188.aspx</guid>
            <pubDate>Wed, 01 Jul 2009 22:46:09 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/influent1/comments/133188.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/influent1/archive/2009/07/01/133188.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/influent1/comments/commentRss/133188.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/influent1/services/trackbacks/133188.aspx</trackback:ping>
        </item>
        <item>
            <title>attaching adventureworks2008 on full version of sql server</title>
            <link>http://geekswithblogs.net/influent1/archive/2009/06/09/132711.aspx</link>
            <description>For anybody that bought the &lt;a href="javascript:void(0);/*1244568976441*/"&gt;SQL Server 2008 Self-Paced Training book for 70-433&lt;/a&gt;, if you are running a full version of SQL Server 2008 rather than the express edition, you will have problems attaching the AdventureWorks2008 database (file activation error).  The trick is to use a SQL command, like so:&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
USE [master]&lt;br /&gt;
GO&lt;br /&gt;
CREATE DATABASE [AdventureWorks2008] ON &lt;br /&gt;
( FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.SQL2008\MSSQL\DATA\AdventureWorks2008_Data.mdf' ),&lt;br /&gt;
( FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.SQL2008\MSSQL\DATA\AdventureWorks2008_Log.ldf' ),&lt;br /&gt;
 FILEGROUP Documents CONTAINS FILESTREAM (NAME = Documents, FILENAME=N'C:\Program Files\Microsoft SQL Server\MSSQL10.SQL2008\MSSQL\DATA\Documents')&lt;br /&gt;
 FOR ATTACH&lt;br /&gt;
GO&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=132711"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=132711" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/influent1/aggbug/132711.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Alex Bransky</dc:creator>
            <guid>http://geekswithblogs.net/influent1/archive/2009/06/09/132711.aspx</guid>
            <pubDate>Wed, 10 Jun 2009 00:39:05 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/influent1/comments/132711.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/influent1/archive/2009/06/09/132711.aspx#feedback</comments>
            <slash:comments>3</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/influent1/comments/commentRss/132711.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/influent1/services/trackbacks/132711.aspx</trackback:ping>
        </item>
        <item>
            <title>sharepoint 2007 (moss) system account</title>
            <link>http://geekswithblogs.net/influent1/archive/2009/04/15/131231.aspx</link>
            <description>&lt;p&gt;I spent the past day trying to figure out why I couldn't log in as myself, Sharepoint would always just say I was logged in as System Account.  After a ton of research and changing things I ran into this:&lt;/p&gt;
&lt;p&gt;To fix this, you must run the following commands: &lt;font color="#ff0000"&gt;&lt;strong&gt;stsadm -o updatefarmcredentials -identitytype NetworkService&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;followed by: &lt;strong&gt;&lt;font color="#ff0000"&gt;iisreset&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;&lt;a href="http://social.technet.microsoft.com/Forums/en-US/sharepointadmin/thread/8d8d9b30-0995-47ba-96e8-7b52872664f3"&gt;http://social.technet.microsoft.com/Forums/en-US/sharepointadmin/thread/8d8d9b30-0995-47ba-96e8-7b52872664f3&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;That solved my problem.  I'm using NTLM authentication and I set up a new Active Directory user called sharepointuser to be the identity for the app pool (changing the app pool from myself to that user probably helped, but that isn't what fixed it ultimately).  I'm pretty sure if I had set up sharepointuser before I installed MOSS 2007 on the Windows 2003 server and specified that user during the installation, I wouldn't have had the auth problems to begin with.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=131231"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=131231" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/influent1/aggbug/131231.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Alex Bransky</dc:creator>
            <guid>http://geekswithblogs.net/influent1/archive/2009/04/15/131231.aspx</guid>
            <pubDate>Wed, 15 Apr 2009 19:40:30 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/influent1/comments/131231.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/influent1/archive/2009/04/15/131231.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/influent1/comments/commentRss/131231.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/influent1/services/trackbacks/131231.aspx</trackback:ping>
        </item>
        <item>
            <title>powershell cut and paste</title>
            <link>http://geekswithblogs.net/influent1/archive/2009/04/15/131223.aspx</link>
            <description>&lt;p&gt;&lt;font face="Arial"&gt;Here's a Powershell script I whipped up to copy all bak files from C:\TEMP to Y:\DEST.  It checks to make sure the file is present at the destination before it deletes it from the source.  I placed it in a ps1 (the extension for Powershell files) file and scheduled a task to execute a batch file that executes the ps1 file.  The reason I had to check for null is that Powershell is kinda dumb and if the source folder is empty it picks it up as a child and performs the Copy-item.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;$oldPath = "C:\TEMP"&lt;br /&gt;
$newPath = "Y:\DEST"&lt;br /&gt;
$GciFiles = get-childitem $oldPath&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;foreach ($file in $GciFiles){&lt;br /&gt;
  Write-host $file.Name&lt;br /&gt;
  if(!($file.Name -eq $null) -and $file.Name.EndsWith(".bak")){&lt;br /&gt;
      Write-host "copying item "+($newPath+'\'+$file)&lt;br /&gt;
      Copy-item $oldPath\$file $newPath&lt;br /&gt;
      if (Test-path ($newPath+'\'+$file)) {&lt;br /&gt;
          Write-host "removing item "+($oldPath+'\'+$file)&lt;br /&gt;
          Remove-item ($oldPath+'\'+$file) -recurse&lt;br /&gt;
      }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=131223"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=131223" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/influent1/aggbug/131223.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Alex Bransky</dc:creator>
            <guid>http://geekswithblogs.net/influent1/archive/2009/04/15/131223.aspx</guid>
            <pubDate>Wed, 15 Apr 2009 16:57:47 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/influent1/comments/131223.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/influent1/archive/2009/04/15/131223.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/influent1/comments/commentRss/131223.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/influent1/services/trackbacks/131223.aspx</trackback:ping>
        </item>
        <item>
            <title>ajax loader in user control within master page</title>
            <link>http://geekswithblogs.net/influent1/archive/2009/04/09/130873.aspx</link>
            <description>&lt;p&gt;&lt;font face="Arial"&gt;I spent hours trying to figure out why my ASP.Net page, which uses a master page with a RadGrid surrounded by a RadAjaxPanel with an AjaxLoadingPanel, would not show the loading message.  I would click on the link to the page in the site menu, then IE would sit and spin for a while until it loaded the entire page, rather than loading the page right away but showing the loading spinner until the data was returned.  What I had to do was add this javascript (w/jQuery) to the user control that the grid was in:&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;
    $(document).ready(function() {&lt;br /&gt;
        setTimeout(loadGrid, 500);        &lt;br /&gt;
    });&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;    function loadGrid() {&lt;br /&gt;
        window['&amp;lt;%=RadAjaxPanel1.ClientID %&amp;gt;'].AjaxRequest('');&lt;br /&gt;
    }    &lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;I'm not sure why I had to make it sleep for half a second, but it wouldn't work until I added that.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;I set up a server-side event (OnAjaxRequest="RadAjaxPanel1_AjaxRequest") that fires when AjaxRequest is called in the javascript:&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;protected void RadAjaxPanel1_AjaxRequest(object sender, AjaxRequestEventArgs e) {&lt;br /&gt;
 Presenter.InitializeView();&lt;br /&gt;
 BindGrid();&lt;br /&gt;
}&lt;br /&gt;
&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=130873"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=130873" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/influent1/aggbug/130873.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Alex Bransky</dc:creator>
            <guid>http://geekswithblogs.net/influent1/archive/2009/04/09/130873.aspx</guid>
            <pubDate>Thu, 09 Apr 2009 16:58:45 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/influent1/comments/130873.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/influent1/archive/2009/04/09/130873.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/influent1/comments/commentRss/130873.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/influent1/services/trackbacks/130873.aspx</trackback:ping>
        </item>
        <item>
            <title>comcast blocking port 25?</title>
            <link>http://geekswithblogs.net/influent1/archive/2009/03/02/129796.aspx</link>
            <description>Even though the email server I'm running at home only sends and receives around 10 emails per month and has never been open for relay, it seems as though Comcast has started blocking port 25.  The technician I've chatted with says otherwise, but either he was wrong or not telling the truth.  I'm just putting that out there in case others have the same problem.&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=129796"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=129796" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/influent1/aggbug/129796.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Alex Bransky</dc:creator>
            <guid>http://geekswithblogs.net/influent1/archive/2009/03/02/129796.aspx</guid>
            <pubDate>Mon, 02 Mar 2009 20:23:55 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/influent1/comments/129796.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/influent1/archive/2009/03/02/129796.aspx#feedback</comments>
            <slash:comments>4</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/influent1/comments/commentRss/129796.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/influent1/services/trackbacks/129796.aspx</trackback:ping>
        </item>
        <item>
            <title>tinyint surprise</title>
            <link>http://geekswithblogs.net/influent1/archive/2009/02/10/129319.aspx</link>
            <description>I just discovered something rather surprising.  If you return a tinyint from a stored procedure as part of a dataset, and bind that dataset to a dataview, and then do something like this:&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: bold;"&gt;&amp;lt;asp:Label runat="server" id="statusLabel" Text='&amp;lt;%# GetStatusText( (int)DataBinder.Eval(Container, "DataItem.status")) %&amp;gt;'&amp;gt;&lt;/span&gt;&lt;br style="font-weight: bold;" /&gt;
&lt;span style="font-weight: bold;"&gt;&amp;lt;/asp:Label&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
You will get an error about an invalid cast.  If the stored procedure returns an int instead of tinyint, it works just fine.  How can ASP.Net 3.5 not be able to cast from a tinyint (or whatever its C# equivalent is) to an int??&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=129319"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=129319" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/influent1/aggbug/129319.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Alex Bransky</dc:creator>
            <guid>http://geekswithblogs.net/influent1/archive/2009/02/10/129319.aspx</guid>
            <pubDate>Wed, 11 Feb 2009 01:05:03 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/influent1/comments/129319.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/influent1/archive/2009/02/10/129319.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/influent1/comments/commentRss/129319.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/influent1/services/trackbacks/129319.aspx</trackback:ping>
        </item>
        <item>
            <title>resharper clean-up gotcha</title>
            <link>http://geekswithblogs.net/influent1/archive/2009/02/03/129173.aspx</link>
            <description>Be careful when using Cleanup Code on a web solution in Visual Studio.  It may change the Inherits string in your Global.asax file in order to remove unnecessary namespaces, which apparently are actually necessary for the site to start up.&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=129173"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=129173" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/influent1/aggbug/129173.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Alex Bransky</dc:creator>
            <guid>http://geekswithblogs.net/influent1/archive/2009/02/03/129173.aspx</guid>
            <pubDate>Tue, 03 Feb 2009 19:34:57 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/influent1/comments/129173.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/influent1/archive/2009/02/03/129173.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/influent1/comments/commentRss/129173.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/influent1/services/trackbacks/129173.aspx</trackback:ping>
        </item>
        <item>
            <title>resharper and auto-property gotcha</title>
            <link>http://geekswithblogs.net/influent1/archive/2008/08/07/124301.aspx</link>
            <description>&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;font size="2"&gt;&lt;font face="Tahoma"&gt;Be very careful when allowing Resharper to convert properties to auto-properties.&lt;span style="mso-spacerun: yes"&gt;  &lt;/span&gt;In some cases it will re-initialize fields that were already initialized earlier on in the constructor.&lt;o:p&gt;&lt;/o:p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;o:p&gt;&lt;font face="Tahoma" size="2"&gt; &lt;/font&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;a href="http://www.jetbrains.net/jira/browse/RSRP-75137;jsessionid=D915EE10CA08D52D70BCAD44AE37447B?page=com.atlassian.jira.plugin.system.issuetabpanels:changehistory-tabpanel"&gt;&lt;font face="Tahoma" color="#800080" size="2"&gt;http://www.jetbrains.net/jira/browse/RSRP-75137;jsessionid=D915EE10CA08D52D70BCAD44AE37447B?page=com.atlassian.jira.plugin.system.issuetabpanels:changehistory-tabpanel&lt;/font&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=124301"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=124301" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/influent1/aggbug/124301.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Alex Bransky</dc:creator>
            <guid>http://geekswithblogs.net/influent1/archive/2008/08/07/124301.aspx</guid>
            <pubDate>Thu, 07 Aug 2008 23:10:29 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/influent1/comments/124301.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/influent1/archive/2008/08/07/124301.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/influent1/comments/commentRss/124301.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/influent1/services/trackbacks/124301.aspx</trackback:ping>
        </item>
        <item>
            <title>generic typing and scope_identity()</title>
            <link>http://geekswithblogs.net/influent1/archive/2008/08/06/124275.aspx</link>
            <description>&lt;p&gt;I recently ran into an interesting problem.  I had created a data access method that used generic typing to execute a scalar SQL Server stored procedure (below), and in the stored procedure was returning SCOPE_IDENTITY() for an integer identity column.  I was passing in a type of "int" to the method (as &amp;lt;T&amp;gt;) since that's what I was expecting back, but I kept getting back null.  After some frustration and bewilderment I discovered that SCOPE_IDENTITY() always returns a decimal, and C# doesn't want to convert the decimal to an integer automatically.  I worked around it by using CAST in the stored procedure so that I didn't have to modify the method.&lt;/p&gt;
&lt;font size="2"&gt;
&lt;p&gt; &lt;/p&gt;
&lt;/font&gt;
&lt;pre&gt;
        private static T? ExecuteScalarStoredProcedure &lt;t&gt; (string sprocName, SqlParameter[] parameters) where T : struct {

            SqlConnection conn = new SqlConnection(GetConnectionString());

            conn.Open();
            object retValue;
            try {
                SqlCommand command = new SqlCommand(sprocName, conn);
                command.CommandType = CommandType.StoredProcedure;
                command.Parameters.AddRange(parameters);

                retValue = command.ExecuteScalar();
            }
            finally {

                try {

                    conn.Close();

                }
                catch (Exception) {
                    //Ignore close exception
                }
            }
            return retValue as T?;
        }
&lt;/t&gt;&lt;/pre&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=124275"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=124275" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/influent1/aggbug/124275.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Alex Bransky</dc:creator>
            <guid>http://geekswithblogs.net/influent1/archive/2008/08/06/124275.aspx</guid>
            <pubDate>Wed, 06 Aug 2008 17:38:38 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/influent1/comments/124275.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/influent1/archive/2008/08/06/124275.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/influent1/comments/commentRss/124275.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/influent1/services/trackbacks/124275.aspx</trackback:ping>
        </item>
    </channel>
</rss>