Tag Archives: Microsoft

Outlook Unread Messages System Tray Envelope Icon Not Showing

The Outlook options structure is pretty arcane with all its n-levels of nesting. It’s pretty hard to find the option you want. So you had a envelope that shows you have unread mails before and it’s not there anymore. Bring it back with:

Tools -> Options -> Preferences -> E-mail Options -> Advanced E-mail Options -> Show an envelope icon in the notification area


The license code is not compatible with the installed version of Microsoft Dynamics CRM

This potential CRM error should typically appear if you had a CRM database, uninstalled it and then tried to reinstall with a different license type. But it can also appear if you used a different license code during the reinstall. You can get confused if you have access to multiple installations and forgot the key you used for a particular instance. But no worries, you can find you key again in SQL -> MSCRM_CONFIG -> ConfigSettings -> LicenseKey. Use that key and it should solve your problem


My Take on the MB2-633 CRM 4.0 Installation and Deployment Exam

Here’s my experience on Microsoft’s MB2-633 exam which I just passed, on the second try.

First of all, as far as I can tell, the Prometric exam has 50 questions and there are only 50 questions in their question pool. The questions I got on my second try are the exact same as on my first exam. Continue reading


CRM 4.0 Read-Only / Disable / Hide Fields Based on Security Role

Suppose you want to make some fields editable for only some users in CRM forms, there is a great and simple MSDN blog that outlines how to do it.

Here’s a copy of  their code. Just change _roles and _fields to the fields’ names that you want to disable for _roles. Flip it around and enable it only for those users by changing line x to false.

Put it in your form’s onLoad event at Customization->your entity->Forms and Views->Form->Form Properties->Event, OnLoad->Edit Continue reading


CRM Workflows Don’t Work, E-mails Don’t Send…

Symptom: You choose to run a workflow but nothing seems to happen and the new workflow doesn’t appear in the workflow tab.

Theory: If my CRM exam studyage served me right, the Microsoft Dynamics CRM is composed of 3 parts. The application layer producing the business logic, the data layer interfacing with SQL and the async service layer doing stuff like workflows on the background (a bit like SQL agent). If the first 2 break, you won’t get your CRM site at all. When the async service layer breaks, it’s a bit more subtle like in this case. Continue reading


Stop Transferring All Internet Traffic Through Windows VPN

By default, when you connect to VPN in Windows, it will put all your Internet traffic through the VPN. This can be annoying if you just want to VPN in to get access to some files on the network. This can be especially annoying if your VPN server is slow and now all your Internet access speed is slow. Continue reading


How to List Checked-Out Files in Team Foundation

In Visual SourceSafe, you were able to look at all the files that were checked-out by members of your team. It is not a default function available for TFS users to find all the checked-out files but it’s an easy task to do.

Continue reading


Moving Bootcamp Partition to New Drive

I bought a new hard drive. My Windows setup already had extensive amount of software and configurations on it that I didn’t want to remake. It worked well, which was rare, so I wanted to keep it.

Winclone is an excellent free tool that lets you do just that! Unfortunately there wasn’t much confirmation on the inter-web that it has been done with Snow Leopard and Windows 7 64-bit. So I tried just that and it worked flawlessly! Continue reading


DataGridView Change Cell Data Type After Binding

I don’t know actually since most of the relevant stuff becomes read-only after filling with data. But my approach is solve this as early on in the process as possible to the entirety of the data and save processing time on a custom loop after.

In other words, your DataGridView is typically bound to a DataTable. That is typically filled with stuff from the database. Make sure your AutoGenerateColumns property is set to true in the DataGridView and select your data to match the type you want to display in the DataGridView. For instance, to get checkboxes,

SELECT ..., CAST(column1 AS bit), ... FROM ...

and change the data type right out of the DataAdapter and DataGridView will figure out the rest automatically


Multi-Threading and Delegates Tutorial in VB .NET

This guide will show you everything you need to create a non-GUI multi-threaded application in VB .NET.

There are 2 ways of using multi-threading in VB .NET. First by making use of delegates which I will explain here. And second by programming the threads manually (not actually more complicated).

Using delegates, .NET helps simplify the entire process of using a separate thread and saves you from having to manage the parameter passing, result retrieving and timing issues. Continue reading


Exclude Views in INFORMATION_SCHEMA

Another quick tip.
Selecting from INFORMATION_SCHEMA.COLUMNS unfortunately returns also every column in views on top of tables. I never use views and definitely don’t need those columns.

To filter them out, use:

SELECT * FROM INFORMATION_SCHEMA.COLUMNS c
JOING INFORMATION.TABLES t ON c.TABLE_NAME = t.TABLE_NAME
AND t.TABLE_TYPE = 'BASE TABLE'

.NET Compare 2 Datarows by Value Using LINQ

There are too many top Google search results giving the impression that it is impossible to compare 2 DataRows for its value contents and the programmer needs to iterate through everything himself.

Such is no longer true in .NET 3.5 but the blogosphere doesn’t seem to have caught on yet.

It is possible, given 2 DataTables or any other enumerable object types, to compare its contents using LINQ in just one line of code.

I will give an example in VB where I’d want to compare all column properties (description, data type, field length, etc) of all tables in 2 supposedly identical SQL databases. Continue reading


SQL Server Check User Permissions

Another quick solution for users of MSSQL Server. fn_my_permissions and results

To view the permissions the current logged SQL user has, use the command

SELECT * FROM fn_my_permissions(NULL, 'DATABASE')

or variations to return a list of SQL commands permitted.

For more details, visit the MSDN page


Invoke UI Changes Across Threads on VB .Net

I need to do this all the time and don’t have the best memory in the world. Today, I decided that I looked this up one too many times so here’s my solution to this multithreading problem:

The Problem:

You try to modify UI components created in one thread in another thread. In VB, you can only make UI changes on the same thread that created it so you get a nice “Cross thread operation not valid” exception.

Here’s the wrong code:

thread = New System.Threading.Thread(AddressOf DoStuff)
thread.Start()
Private Sub DoStuff()
    'error occurs here'
    Me.Text = "Stuff"
End Sub

Continue reading