The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,860 other subscribers

Archive for the ‘Delphi’ Category

Why SizeOf for character arrays is evil: stackoverflow question “Why does this code fail in D2010, but not D7?”

Posted by jpluimers on 2010/05/11

This Why does this code fail in D2010, but not D7 question on stackoverflow once again shows that SizeOf on character arrays usualy is evil.

My point in this posting is that you should always try to write code that is semantically correct.

By writing semantically correct code, you have a much better chance of surviving a major change like a Unicode port.

The code below is semantically wrong: it worked in Delphi 7 by accident, not by design:
Like many Windows API functions, GetTempPath expects the first parameter (called nBufferLength) number of characters, not the number of bytes. Read the rest of this entry »

Posted in Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi XE, Delphi XE2, Delphi XE3, Development, Encoding, ISO-8859, Software Development, Unicode | Leave a Comment »

SQL Server 2008 R2 got to RTM last week

Posted by jpluimers on 2010/04/29

After the excitement of .NET 4.0 and all the tools around it, I totally forgot to mention that SQL Server 2008 R2 got to RTM.

If you are an MSDN subscriber you can download it there.

If you are not, you can download the Microsoft SQL Server 2008 R2 RTM – Express with Management Tools.

Brent Ozar wrote a pretty nice FAQ on the new SQL Server 2008 R2 features, much better than the “what’s new” and press release by Microsoft.

Feature conclusion so far:

  • nice new stuff for Business Intelligence
  • no new stuff on the engine and T-SQL front
  • watch your licensing when doing virtualization; the non-R2 is far cheaper for that

–jeroen (who just turned 41 today)

Posted in .NET, Database Development, Delphi, Development, Software Development, SQL Server | 2 Comments »

Microsoft Enterprise Library 5.0

Posted by jpluimers on 2010/04/28

The Microsoft patterns & practices Developer Center released the Microsoft Enterprise Library 5.0 last week.
This version of the Enterprise Library has a ton of new features, and now has full support for .NET 4.0 and Visual Studio 2010.

Next to using it from C#/VB.NET, I’m looking forward to see how well this can be used from the upcoming Delphi Prism 2011 release (scheduled to be released on May 15th).

Lots of stuff to experiment with :-)

–jeroen

Posted in .NET, C# 4.0, Delphi, Development, Prism, Software Development | Leave a Comment »

MSDN and TechNet: SharePoint, Office, Visio and Project 2010 RTM are now available

Posted by jpluimers on 2010/04/27

If you have a TechNet or MSDN account, you can download the SharePoint, Office, Visio and Project 2010 RTM builds.
Downloads have become available on April 23rd.

The SharePoint designer is available from the Microsoft Download centre as William Conrwill describes at CodeJedi.NET : SharePoint, Office, Visio and Project 2010 RTM are now available on MSDN.

If you have SA, then as of today (April 27), you can get your volume licenses as well.

William describes more dates in his post Office, SharePoint, Project and Visio 2010 have made RTM!

I’ll be busy playing with all the bits from Delphi and .NET API perspective :-)

–jeroen

Posted in .NET, Delphi, Development, Power User, Prism, Software Development | Leave a Comment »

Upgrading Visual Studio 2010 RC to RTM

Posted by jpluimers on 2010/04/22

I usually pick a fresh VM for installing an RTM build, but if you have loads of stuff on your (physical) machine, upgrading RC to RTM can be a real time saver.

Stack Overflow has a nice question Upgrading Visual Studio 2010 RC to RTM answered by Danny Thorpe (yes, two links: blog / wikipedia).

The order is really imporant, so lets repeat that here:

  1. Uninstall all the VS 2010 parts
  2. Uninstall the .NET Framework Multitarget package.
  3. Reboot
  4. Uninstall the .NET Framework client package
  5. Reboot

–jeroen

Posted in .NET, C#, C# 4.0, Delphi, Development, Prism, Software Development, Visual Studio and tools | Leave a Comment »

Maximum URL lengths

Posted by jpluimers on 2010/04/20

A client recently asked me what space should reserve to store URLs in their DBMS.

The plurality in the topic title is a hint: different systems have different limits on URL lengths.

But first:

Don’t use long URLs

If you use long URL’s (longer than say a coupe of 100 characters), then usually you have a problem.

First of all: short URL’s are easier to remember, index and search.

Second: long URL’s can pose problems.
It might be that your browser and server support them.
But a user might be behind an intercepting proxy (sometimes invisible to both you and your user) that imposes a URL limit.

In stead of long URLs with a HTTP GET, use shorter URLs with a HTTP POST. Read the rest of this entry »

Posted in .NET, ASP.NET, Delphi, Development, Firefox, Internet Explorer, Opera, Safari, Web Browsers, Web Development | 8 Comments »

Breaking changes in .NET 4.0

Posted by jpluimers on 2010/04/14

Every major release of software will bring great new stuff, but the price of upgrading from a previous version is that some stuff will break.

.NET 4.0 brings a lot of nice stuff as well, but there are a few things that break.

There is a nice Breaking changes in .NET 4.0 – Stack Overflow article on this.

The article is now a community wiki, and refers to these pages:

Since the article is a community wiki, expect it to be updated over time.

I wonder what these changes will bring (and break) in the upcoming Delphi Prism release (the datasheet is out now, the product should be out before the end of may).

–jeroen

PS:

If you do not have an MSDN subscription, but still want to see if things break for you, try one of these:

Scott Guthrie has a nice post on the bells and whistles of VS2010.

Posted in .NET, ASP.NET, C#, C# 4.0, Delphi, Development, Prism, Software Development, Visual Studio and tools, Web Development | 1 Comment »

Visual Studio 2010 RTM will be available on MSDN at 10AM PST *today*

Posted by jpluimers on 2010/04/12

For MSDN subscribers:

Visual Studio 2010 RTM will be available on MSDN around these times:

  • 10:00 PST
  • 13:00 EST
  • 17:00 UTC

Other time zones: see this Worlclock link.

Sources:

Posted in .NET, Delphi, Development, Software Development, Visual Studio and tools | Leave a Comment »

Classic UI mistake – OK/Cancel buttons for a Yes/No question.

Posted by jpluimers on 2010/04/12

Just unlinked/linked my DropBox account because of some synchronization issues, then got this messagebox:

—————————
Dropbox
—————————
There is already a folder in your My Documents folder called ‘My Dropbox’. Do you want to merge all the existing files in that folder into your Dropbox?
—————————
OK   Cancel
—————————

Sometimes I wonder if programmers ever are going to learn to get the basic UI things right :-)

(This was in version 0.7.110.0 of dropbox)

–jeroen

PS:
I absolutely love the functionality of dropbox, and to their credit: they do get most of their UI right.

Posted in .NET, Delphi, Development, Software Development, UI Design | 7 Comments »

Non-English error messages…

Posted by jpluimers on 2010/03/17

Sometimes you wish there was some universal translation table to get the English error messages.

Just got this at a client:

Project Foo.exe raised exception class EOleException with message ‘De bewerking moet worden uitgevoerd op een query die kan worden bijgewerkt‘.

The English translation of the error message is “Operation must use an updateable query” (which is also wrong: the query is indeed updateable).
But not knowing that English translation beforehand, how do you find out the cause?

Read the rest of this entry »

Posted in Access, Database Development, Delphi, Development | 2 Comments »