Look, It's Official Now - I Am the 'Owner' of a Zoo

Posted by: Imar Spaanjaars at Tuesday, October 17, 2006 8:16:31 PM in: Imar's Blogs
A couple of days ago I received my certificate that states that I am now the owner of zoo in the Netherlands. You don't believe me?
Read on ...

Filling a DataTable or DataSet the Quick Way

Posted by: Imar Spaanjaars at Tuesday, September 19, 2006 8:29:13 PM in: ADO

In .NET 1.x filling a DataSet or a DataTable meant quite some work. You needed to create a Connection object, a DataAdapter and optionally a Command object. Then you had to call the Fill method on the DataAdapter and pass it a newly created DataSet or DataTable.

In .NET 2.0, this code model has been simplified, thanks to the Load method on the DataTable and DataSet classes that takes an IDataReader as a parameter.

Read on ...

Retrieving the Parameter Marker Format When Using Generic Database Factories

Posted by: Imar Spaanjaars at Tuesday, September 19, 2006 7:57:27 PM in: .NET 3.5 General

With .NET 2, Microsoft introduced something called DbProviderFactories that allows you to work with databases in a generic fashion. That is, you don't create strongly typed objects like a SqlConnection or an OleDbConnection at design-time, but defer the decision what object to create till run-time. This way, you can write code that works against a number of different databases, like SQL Server, Oracle and OleDb databases like Microsoft Access.

One of the big differences between how these databases operate is the way you must name the parameters you send to a stored procedure or query. For example, SQL Server uses the @ symbol (@userName) and even allows you to leave out a prefix altogether. Microsoft Access in turn uses a question mark without a specific name while Oracle uses a colon as the prefix. Now, how do you deal with these differences when you don't know what database you're working with till run-time?

Read on ...

Using the Microsoft Access Providers to Replace the Built-In SQL Server Providers

Posted by: Imar Spaanjaars at Monday, August 21, 2006 8:30:59 PM in: ASP.NET 2.0

Update 2011/1/9: I just published a short article that shows you how to use the Microsoft Access Providers in an ASP.NET 4 web site.

The biggest features brought by ASP.NET 2.0 are most likely the new services for membership, roles, personalization and profiles. These services supply you with a lot of functionality out-of-the-box with little to no custom code. The services that ship with .NET 2.0 all use SQL Server as the data store (either the Express edition, or the full commercial versions) by means of a provider. But what if you can't use SQL Server, for example because your hosting company doesn't support it? In that case, you can use the Microsoft Access Providers, a shared source initiative released by Microsoft that allows you to use a Microsoft Access database for all the provider based features.

This article shows you how to acquire, compile and use these Microsoft Access Providers.

Read on ...

Easily Embed a Windows Media Player in a Web Page

Posted by: Imar Spaanjaars at Sunday, August 6, 2006 7:22:45 PM in: (X)HTML
I keep forgetting the code that's required to embed a Windows Media Player movie in a web page, so I decided to add it to my Snippets collection for easy reference.
Read on ...

IKEA and the Art of Manual Writing

Posted by: Imar Spaanjaars at Sunday, August 6, 2006 6:39:43 PM in: Imar's Blogs
I just finished assembling an IKEA audio rack and I couldn't stop thinking about how great the concept of IKEA's manuals is. I wish hardware and software manufacturers were able to achieve the same effectiveness with their manuals.
Read on ...

Want to Be My Colleague?

Posted by: Imar Spaanjaars at Monday, July 31, 2006 7:21:20 PM in: Imar's Blogs
Do you want to be my colleague and get involved in the projects I am working for? Now is your chance, because we're hiring...
Read on ...

Building Smarter User Controls

Posted by: Imar Spaanjaars at Sunday, July 23, 2006 2:11:05 PM in: ASP.NET 2.0

User Controls are very common in today's ASP.NET websites, both in version 1.x as in version 2.0. Many sites use them to reuse content, like a menu, a header or a footer or even for partial page content, like a shop's product catalog.

However, User Controls can be used for more than simply displaying static, repeating content. With a bit of knowledge about how User Controls work, you can teach them a few tricks. By adding public properties to a User Control, they become much more powerful and easier to reuse.

In this article I'll show you how to build a User Control that displays information about an article, like a news item, similar to the Details section that you find at the top of most pages in my site.

Although I am using Visual Studio 2005 and ASP.NET 2.0 in this article, the same principles and code work for Visual Studio .NET 2002 / 2003 and ASP.NET 1.x as well.

Read on ...

I'm Back!!!

Posted by: Imar Spaanjaars at Saturday, July 1, 2006 5:47:19 PM in: Imar's Blogs
Over the past four days, my server has been down due to some major hard- and software problems....
Read on ...

Netherlands against Argentina: 0 - 0

Posted by: Imar Spaanjaars at Thursday, June 22, 2006 11:53:47 AM in: Imar's Blogs
I just came home from a short trip to Frankfurt, Germany together with my brother where we watched the Dutch play against Argentina. Unfortunately, the game ended in a draw of 0 - 0.
Read on ... 12345678910111213141516171819202122232425262728293031