Is it a bad sign if you leave home in the morning in a car for a day of racing on the track and come home by train in the evening?

Is it a bad sign if you leave home in the morning in a car for a day of racing on the track and come home by train in the evening? I guess it is But fortunatly I didn’t crash it, all I had was an electrical failure. Still it sucked big time as I really was looking forward to a day of race training on the Zandvoort race circuit. Actually kind of funny, the Mazda MX-5 I have is supposed to be a very reliable car yet it has given me more trouble in the 18 months I have … Continue reading Is it a bad sign if you leave home in the morning in a car for a day of racing on the track and come home by train in the evening?

Getting a Type by its name

The Type.GetType() makes it real easy to get a handle on a Type object. However there is a gotcha here because it might not always work as expected. Try the following code:   Module Module1     Sub Main()         Dim type1 As Type         type1 = GetType(MyType)         Dim type2 As Type         type2 = Type.GetType(type1.FullName)           Console.WriteLine(type1.FullName)         Console.WriteLine(type2.FullName)         Console.ReadKey()     EndSub EndModule   PublicClass MyType EndClass   If you run this code the type name will be printed twice, no big surprises here. Now move the MyType to a ClassLibrary … Continue reading Getting a Type by its name

Copying source code as HTML from Visual Studio 2005

One of the things I frequently do is copy VB source code into emails and documents. Now Visual Studio 2005 formats the source code on the clipboard but the resulting HTML is a bit of a dog. Most of the time I just ignored this as a minor annoyance but I was working on a newsletter and the HTML needs to be as clean as possible, clearly not what VS2005 produces.   Fortunately there is a solution and it is called CopySourceAsHTML. There is a special VS2005 installer, take a look at this blog post for details on how to download and install … Continue reading Copying source code as HTML from Visual Studio 2005

Paragliding on the beach

Yesterday I went paragliding on the Beach near Amsterdam for the first time Took a few tries to get airborne as the start is quite different but once I was up there I had a great time.       Maurice de Beijer www.TheProblemSolver.nl

SQL Server Mobile/Everywhere and FoxPro

If you are like me and have a Visual FoxPro background you might me pleasantly surprised if you take a look at SQL Server Mobile/Everywhere   Not only do we get ClickOnce/XCopy style deployment like we used to be able to do we also get a more familiar data model then we get using SQL Server (Express).   A few interesting classes and functions: SqlCeResultSetThis gives us direct access to the underlying data. No longer do we get an in memory copy as well as the original in the database, what you see is what you have Use a SqlCeCommand.ExecuteResultSet()  … Continue reading SQL Server Mobile/Everywhere and FoxPro

Anonymous methods

Sometimes I wish I was using C# instead of Visual Basic And anonymous methods are one of the things that tend to bring that wish to the surface. Consider the following code: using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication1 {    classProgram    {       staticvoid Main(string[] args)       {          List<DemoEntity> list = newList<DemoEntity>();          list.Add(newDemoEntity(1, “one”));          list.Add(newDemoEntity(2, “two”));          list.Add(newDemoEntity(3, “three”));          string theId = “two”;          DemoEntity found;          found = list.Find(delegate(DemoEntity obj) { return (obj.Id == theId); });          Console.WriteLine(found.Id);          found = list.Find(delegate(DemoEntity obj) { return (obj.Number == 3});          Console.WriteLine(found.Id);          found = list.Find(delegate(DemoEntity … Continue reading Anonymous methods

SQL Server Everywhere Edition announced

In this last update Paul Flessner announced SQL Server Everywhere Edition.   I think this is real good news as this promises to be a small lightweight in process data store that fits the requirements when creating offline applications. And as SQL Server Everywhere Edition is in fact based on SQL Server Mobile it is just a set of DLL’s that need to be copied with the application, no registration. In short; perfect for a ClickOnce deployment.   Looking forward to the release. For more info read Paul’s update at http://www.microsoft.com/sql/letter.mspx or http://blogs.msdn.com/smartclientdata/archive/2006/04/06/SQLEverywhere.aspx and http://blogs.msdn.com/smartclientdata/archive/2005/07/15/439008.aspx     Maurice de Beijer www.TheProblemSolver.nl