Click here to Skip to main content
14,925,905 members

Articles by Mycroft Holmes (Articles: 6, Tip/Tricks: 7)

Articles: 6, Tip/Tricks: 7

RSS Feed

Average article rating: 4.67

Database Development
SQL Server
Posted: 6 Dec 2008   Updated: 18 Dec 2008   Views: 168,109   Rating: 4.77/5    Votes: 22   Popularity: 6.31
Licence: The Code Project Open License (CPOL)      Bookmarked: 58   Downloaded: 2,001
Please Sign up or sign in to vote.
A workaround for the limitation of only being able to pivot one column.
Desktop Programming
Windows Forms
Posted: 31 May 2009   Updated: 31 May 2009   Views: 289,213   Rating: 4.75/5    Votes: 33   Popularity: 7.21
Licence: The Code Project Open License (CPOL)      Bookmarked: 94   Downloaded: 16,515
Please Sign up or sign in to vote.
Copy and paste between a DataGridView and Excel.
Posted: 5 Jun 2009   Updated: 5 Jun 2009   Views: 106,442   Rating: 4.55/5    Votes: 9   Popularity: 4.34
Licence: The Code Project Open License (CPOL)      Bookmarked: 64   Downloaded: 4,935
Please Sign up or sign in to vote.
Using SQL Server 2008 Hierarchy ID data type to populate a TreeView
Programming Languages
C#
Posted: 5 Sep 2008   Updated: 5 Sep 2008   Views: 38,137   Rating: 4.25/5    Votes: 9   Popularity: 4.06
Licence: The Code Project Open License (CPOL)      Bookmarked: 25   Downloaded: 178
Please Sign up or sign in to vote.
Store and retreives the last position and size of a form using an XML file.
Posted: 13 Sep 2008   Updated: 13 Sep 2008   Views: 68,357   Rating: 4.80/5    Votes: 11   Popularity: 4.80
Licence: The Code Project Open License (CPOL)      Bookmarked: 50   Downloaded: 3,389
Please Sign up or sign in to vote.
Utility class to import and export CSV files.
Posted: 10 Jul 2009   Updated: 10 Jul 2009   Views: 66,743   Rating: 4.93/5    Votes: 12   Popularity: 5.13
Licence: The Code Project Open License (CPOL)      Bookmarked: 73   Downloaded: 3,938
Please Sign up or sign in to vote.
A user control that can be attached to any DataGridView that uses a DataTable as the DataSource.

Average blogs rating:

No blogs have been submitted.

Average tips rating: 4.36

Database Development
Posted: 10 Feb 2010   Updated: 26 Apr 2010   Views: 10,861   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 5   Downloaded: 0
Please Sign up or sign in to vote.
Assuming that a carriage return represents a line of code, this will count the lines of code in a SQL 2008 database:SELECT ROUTINE_NAME,ROUTINE_TYPE,LEN(ROUTINE_DEFINITION )-len(REPLACE(ROUTINE_DEFINITION,CHAR(10),'')) LOCFROM INFORMATION_SCHEMA.ROUTINESCOMPUTE...
SQL Server
Posted: 18 Nov 2009   Updated: 18 Nov 2009   Views: 18,340   Rating: 3.86/5    Votes: 4   Popularity: 2.32
Licence: The Code Project Open License (CPOL)      Bookmarked: 6   Downloaded: 0
Please Sign up or sign in to vote.
Reparenting a Tree branch is a PITA using the HierarchyID functions. This reparents a branch by reformating the string representation of the HierarchyID. Supports moving the branch to the root node. I use an ID as the primary key so the proc expects the ID's of the node recordsDECLARE @NodeID INT
Posted: 17 Mar 2010   Updated: 17 Mar 2010   Views: 26,600   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 1   Downloaded: 0
Please Sign up or sign in to vote.
When grouping data within a List control I need a header table and child table. The data comes from 1 datatable where the 1st #n columns are duplicated for each detail rows.The usual answer to this is to set the hide duplicates value in the textbox. This suppresses the text but the row is...
Programming Languages
SQL
Posted: 7 Sep 2009   Updated: 7 Sep 2009   Views: 11,640   Rating: 2.60/5    Votes: 3   Popularity: 1.24
Licence: The Code Project Open License (CPOL)      Bookmarked: 8   Downloaded: 0
Please Sign up or sign in to vote.
Select dateadd(day, -1, dateadd(month, 1, dateadd(day, 1 - day(@Date), @Date))
Posted: 18 Jul 2010   Updated: 18 Jul 2010   Views: 25,123   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 3   Downloaded: 0
Please Sign up or sign in to vote.
Gets the last week day of the month
Posted: 25 May 2010   Updated: 26 May 2010   Views: 16,050   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 3   Downloaded: 0
Please Sign up or sign in to vote.
GetAncestor() requires a slightly unusual outlook to get the required results
Posted: 11 Jul 2010   Updated: 14 Jul 2010   Views: 34,371   Rating: 4.09/5    Votes: 12   Popularity: 4.26
Licence: The Code Project Open License (CPOL)      Bookmarked: 13   Downloaded: 0
Please Sign up or sign in to vote.
Why do developers insist on separate procedures to do these jobs

Average reference rating:

No reference articles have been posted.

Average project rating:

No projects have been posted.

Mycroft Holmes
Retired None
Australia Australia
Started my programming life writing Excel 1.0 macros, God what a long time ago.

Now I'm a dotnet developer, I get to influence direction, play with new toys, build stuff, life is wonderful.

Greatest buzz you can get, walk past a row of desks and see your application running on all of them (and getting paid).

Greatest irritant, pouring 12 months of knowledge and experience into an empty head only to have it leave.