Thursday 26 April 2012

WPF binding to application settings

It is advisable to bind to a view model, but it is possible to bind to the application settings:

<Application x:Class="Toolkit.Shell.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:properties="clr-namespace:Toolkit.Shell.Properties">

<TextBox Grid.Row="2" Grid.Column="3" Text="{Binding Source={StaticResource Settings}, Path=Default.SetPublisherHost}" />

and when the application closes

Shell.Properties.Settings.Default.Save();

Installing a service

You can install a service using the SC command. Note that is is important you leave a space after the equals sign when specifying options.

sc create Endur binPath= "C:\OpenLink\Program\Endur_V91R2_07112011GAZ_09012011_1164_APM_2.6.6\bin\master.exe -nt_service OpenLink_Endur"

sc description Endur "Endur Service for database END_DB_LOCAL on GMTxxxx"


Tuesday 24 April 2012

Module OpenComponents Module 1 has terminated when calling OpenLink from LinqPad

When calling  tf.RetrieveTransaction(transactionNum) from LinqPad, the query freezes and the OpenLink listen window displays "Module OpenComponents Module 1 has terminated" immediately.

This is because LinqPad was not started from the OpenLink binary folder (C:\OpenLink\Program\Endur_V91R2_07112011GAZ_09012011_1164_APM_2.6.6\bin).

Monday 16 April 2012

Fixing intellisense in SQL Server Management Studio

SQLServer2008R2-KB2507770-x64 fixes the missing Intellisense in SQL Server Management Studio.