My colleague Steve emailed me today and asked "why are there 214 indices on the table SA_OrderHeader?"

I laughed, and told him don't be silly. SQL Server Enterprise Studio showed 'only' 22. But Steve was using SQL Manager 2008 for SQL Server and saw the strangely named indices below:

Intrigued, I did an sp_help SA_OrderHeader and now I could see them...hypothetical indices!

So, I did some reading about this, and it turns out these are created by the Index Tuning Wizard, and are normally removed when it runs to completion, but I guess sometimes not... see here for instance....

Orlando, FL — Microsoft Corp just announced that Lino Tadros, President and CEO of Falafel Software, has been voted MVP in C# for the fourth year in a row.

"Microsoft Most Valuable Professionals (MVPs) are exceptional technical community leaders from around the world who are awarded for voluntarily sharing their high quality, real world expertise in offline and online technical communities. Microsoft MVPs are a highly select group of experts that represents the technical community's best and brightest, and they share a deep commitment to community and a willingness to help others", according to Microsoft.

Mr Lino Tadros is currently attending  the ...

Orlando, FL — Falafel Software Inc, a Microsoft Gold Certified Partner providing consulting, training, and custom software development for enterprise and small business customers, is proud to announce the release of the Telerik Trainer product.
The Telerik Trainer is a state of the art learning tool, leveraging the latest technologies to combine video training with hands on coding. The tool was custom built for Telerik Corporation, as part of their effort to provide the best online support for their award winning RadControls and Reporting product suites.

The Telerik Trainer, depicted below, is an advanced video player that uses powerful new Microsoft ...


In case you hadn't noticed, there is a Beta of SP1 for Visual Studio 2008 and .NET Framework 3.5 out there. You should really check it out, it has tons of goodies, especially if you need some performance boosts in your WPF applications.

In this blog, I want to highlight a little hack that Microsoft added to the designer. In some instances, with complex nested Web Application Project solutions, the 2008 designer can not locate the master page. This used to be the case in 2005 designer too, but it would just show an error message for the master ...

In a Windows Presentation Foundation (WPF) application, you are only allowed to update UI objects in the thread that created them, which for UI objects will be the main UI thread.

If you have code that needs to check whether it is in the correct thread or not before updating the UI, you can use the CheckAccess method of DispatcherObject, which is the base class of all UI elements (via Visual, and DependencyObject). CheckAccess will return false if you may not update the object that you called CheckAccess on from the current thread (there is a related method, VerifyAccess, which ...

I was working on some code today, that was trying to find a string in a list of strings. I came up with a neat way to express it using a lambda expression.

The original code looked something like this:

public  static  void f( List<string> assemblies )
{
     // ...  if (assemblies.Contains(file.Name))
         // ...
}

If you want to set the same value on a whole set of rows, you can use ActiveFocus powerful multi edit feature to save time.

First, check all the items that you want to change:

image

Next, go to the Selected Items section of the Navigation Bar - you will see the selected items:

image

Now, set whatever common values you want in the details area, and click Save

image

The change is applied to all the selected items:

image

Today I refactored some code that has been bugging me for a while, and wanted to share the results. The change resulted in a substantial code reduction and what I felt was a more elegant solution.

The code that I was looking at had a whole suite of objects that all implemented a proprietary ITransactionHandler interface, with methods such as Process(), and properties such as TransactionType and TransactionName. It was the latter two that made for some very verbose and awkward code. I found this basic pattern repeated in each class, and there were some 40 of these:

public  class...

Santa Cruz, CA— Falafel Software Inc., a Microsoft Gold Certified Partner providing consulting, training, and software development for enterprise and small business customers, is proud to announce the renewal of its Microsoft Gold Certified Partner membership for 2008.

Falafel has been a Microsoft Certified Partner for five years and reached the Gold level in 2006.

“Gold Certified Partners represent the highest level of competence and expertise with Microsoft technologies and have the closest working relationship with Microsoft,” states Microsoft’s Partner site.

Falafel Software is a Gold Certified Partner with three core competencies: custom development solutions in web development, ...

I wrote a query this morning to detect if there are any values in a certain table IN_DumpReason in my SQL Server 2005 database that are not present in somebody else's SQL Server 2000 database:

select *
from IN_DumpReason
WHERE DumpReasonCode NOT IN (
    select reason_id
    from highjump.AAD.dbo.t_reason )

I received the following error message:

"Cannot resolve the collation conflict between "Latin1_General_BIN" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation."

Huh! After some Googling I found that you can tell SQL Server what collation to use when doing an equals test. Use the syntax

ColName COLLATE  CollationName

So ...





Santa Cruz, CA — Falafel Software Inc, a Microsoft Gold Certified Partner providing consulting, training, and software development for enterprise and small business customers, today announced the opening of their new office in Santa Cruz, CA. The office will serve as the regional base for consulting and training in the Silicon Valley and as the center for research and development of Falafel’s ActiveFocus product.

 

“I am very pleased and excited to announce this important step. Falafel Software has been growing steadily over the last year, and it was logical to take the business to the next level by creating a ...

Google Gears

I was on a conference call today talking to a client about how to architect a 'sometimes connected' web application, where the user would be able to

  • connect to a central web app/database when Internet access was available and see all data
  • download a local copy of needed data and then disconnect and continue to use the app with the local data copy, still in a browser
  • make change, deletions, and additions to the data in disconnected mode
  • when connected again, sync changes with the central data store.

Furthermore, this was to work cross browser, and cross OS ...

Click the Filter button on the top of your artifact grid:

image

In the # column, type your number and press Enter:

image

Your artifact is shown:

image

To search, just type a word in the Search box below and press Enter. All matching artifacts are shown in the grid, and you can page, sort etc as usual. They are initially sorted by Rank, which is a numeric value assigned to them by the free text search engine, the most relevant is shown first.

The search will look in all text fields of your artifact, for instance the Title, Description, Response etc. Notice that in the fourth match below, the word "screen" is not in the title.

image

The free text search language is that used by Microsoft Free ...

To do this, start by defining the Milestones. Click on this tab in the left navigation bar:

image

Then, in the Milestones grid, define the start and end data of each stage of the project:

image

Now click on your project in the project tree and you will see the Milestones laid out in a Gantt chart:

image

When you enter new artifacts, specify which Milestone they belong to (here called Events):

image

The Event for each artifact is shown in the grid:

image

You can filter the grid to show only artifacts from a certain event:

image

To do this, go to your user profile by clicking on this arrow:

image

Then, click Grids, enter the number or rows that you wish to see, and click Save:

image

There are a few different versions that you can download, a 1+ GB version that works for 64 bit and 32 bit, and a much smaller 400+ MB version just for 32 bit, which is what I downloaded.

I ran the setup, but it said my language wasn't supported. I have a US English version, so that was kind of weird... So I downloaded the other 1+ GB version and tried that. Same issue. Hmmm....

Finally, I figured it out. I have a Swedish language pack installed on my Vista (because I can say things like hurdy burdy and I can cook ...

All you need to do is enter an expression like this:

=RunningValue(Fields!NetQty.Value, Sum, "grpGrower")

  • The first parameter is the expression that is to be aggregated, in this case a field in my dataset.
  • The second parameter is what aggregation function to perform (it could also be something like Count, Max or Min)
  • The third and last parameter determines the scope of the aggregation. If you supply Nothing, the total spans over the whole dataset. If you specify the name of a containing group (as I do above), the total restarts for each new value in that group....

I don't know how many times I have implemented the Singleton Design Pattern in C#, but it was starting to get old...

So I Googled the net, looking for something I could re-use. I found this excellent article, and adapted it to use Generics. This is what I came up with:

using System;

namespace TT
{
     #region Singleton<T>
     /// <summary>  /// Provides a Singleton implementation using Generics.  /// </summary>  /// <typeparam name="T">Type of singleton instance</typeparam>  public  sealed  class Singleton<T>  where T :  new() {
        Singleton() {}

         public  static T Instance {
            get {
                 return Nested.instance;
            }
        }

         class Nested ...

One of the things I have come to love about Linq is how you can focus more on declarative programming: focusing on what you want to accomplish rather than how.

See for example below - I have a generic list of SolutionDescriptor instances (a class in my project that describes a position in a Visual Studio solution), and want to search if for the best match to the language and Visual Studio version preferences in a UserProfile instance:

Note the three queries against the List, each one a Linq expression, starting with an attempt at an exact match, then  ...