Geeks With Blogs

News
The Wrecking Bawl Destructuring query language, one keyword at a time. general .Net stuff
recursive history in tfs

For those of you who, like me, transitioned from Subversion and TortoiseSVN to TFS, you might be confused as to how to view the history of a folder recursively.  My problem was that I was wanting to see the recursive history in the Solution Explorer rather than the Source Control Explorer.

Posted On Friday, August 6, 2010 8:45 AM

creating a list of consecutive integers in c#
If there's already a way to get a List<int> of consecutive integers without a loop in C#, I don't know what it is, so I created a method for it. public static List<int> GetIntegerListFromRangeUsin... start, int end) { if (end < start) { throw new ArgumentException("Faulty parameter(s) passed: lower bound cannot be less than upper bound."); } List<int> returnList = new List<int>(end - start + 1); for(int i = start; i <= end; i++) { returnList.Add(i); } return returnList; ......

Posted On Wednesday, April 28, 2010 7:17 AM

ajax loader in user control within master page
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 ......

Posted On Thursday, April 9, 2009 4:58 AM

tinyint surprise
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: <asp:Label runat="server" id="statusLabel" Text='<%# GetStatusText( (int)DataBinder.Eval(Contai... "DataItem.status")) %>'> </asp:Label> 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 ......

Posted On Tuesday, February 10, 2009 1:05 PM

resharper and auto-property gotcha
Be very careful when allowing Resharper to convert properties to auto-properties. In some cases it will re-initialize fields that were already initialized earlier on in the constructor. http://www.jetbrains.net/ji... ......

Posted On Thursday, August 7, 2008 11:10 AM

generic typing and scope_identity()
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 <T>) 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 ......

Posted On Wednesday, August 6, 2008 5:38 AM

activerecord and executereader exceptions
About once a day I was getting the following error from an ASP.Net web page that uses ActiveRecord: Exception Details: System.Data.SqlClient.SqlEx... A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.) I would subsequently get this error upon refreshing the page: Exception Details: System.InvalidOperationExce... ExecuteReader requires an open and available Connection. ......

Posted On Wednesday, May 28, 2008 8:46 AM

granularity error in SSAS MDX drillthrough query
I was trying to create an MDX drillthrough this morning in my SSAS 2005 cube, and I got this error: Errors from the SQL query module: The attribute 'Applicant Name' in the dimension 'Dim Candidate' is outside the granularity of the measure group 'Fact Requisitions' and cannot be returned as a column. I only got one result from Google for that error message and it wasn't helpful at all. After trying a million different things with partitions and actions and whatnot, I finally figured out the problem: ......

Posted On Wednesday, April 9, 2008 10:44 AM

CPU percent limit in .Net

Why doesn't the .Net framework have anything that lets you set a maximum CPU usage for an application?  Is it something Windows can't handle?  I'd really like to be able to say, "I don't care if this app gets stuck in a loop or whatever, it will never get above 25% CPU."

Posted On Friday, February 1, 2008 11:29 AM

fastest way to show SQL data in a web page
I'm curious what people think is that fastest way to show SQL Server data in a web page. Assuming you create the virtual web in IIS yourself, I'm hoping somebody knows of something that lets you create an xml file with connection settings and a query file, then the product automagically puts the data in a grid on the web page. Granted once you're used to Visual Studio it doesn't take terribly long to do such a thing, but I'd still like something faster, maybe something that can automagically create ......

Posted On Wednesday, November 21, 2007 11:45 AM

Copyright © Alex Bransky | Powered by: GeeksWithBlogs.net