VB 2005: Quick introduction to the world of .NET

Before .NET came, COM (Component Object Model) was the norm.  You build COM objects to make your code reusable and so that you can fit them in a 3-tier or n-tier architecture.  This architecture was called or marketed by Microsoft as DNA (Distributed interNet Architecture).  It is just a way to architect or build distributed business applications using (but not necessarily) Microsoft technologies.  One of its technologies besides COM, is MTS (Microsoft Transaction Server).  MTS is a run-time environment that provides objects with not only transaction services but also concurrency, resource pooling, security, context management, and other system-level services.  It provides location transparency as well.  Then there is this COM+ which is just COM and MTS combined.

Now that we have .NET, it’s time to learn this new technology from Microsoft which I think will stay with us for some time.  .NET is the next generation platform that developers can take advantage of in building not only distributed applications but the more traditional applications as well, more easily and intuitively.  Which is why .NET is appropriately called .NET Framework.

Here I am going to blog about .NET 2.0.  The latest version now is 3.0 but it is still relatively new and I think the knowledge you will get from understanding the .NET Framework even if it’s not the latest version will be useful for a long time.

Basically the .NET Framework contains the following major components: CLR (Common Language Runtime), .NET Framework Base Classes, Windows Forms and ASP.NET

CLR is where component loading, memory management, reference tracking for objects and garbage collection happens.  It includes a common system of datatypes and coupled with standard interface convention, provides cross-language inheritance.  It also provides easy deployment of your .NET applications. 

One thing to note about applications in .NET is that they are self-describing because metadata, the information that describes the applications, is stored together with the application itself.  This is key to the easy deployment in .NET.

.NET Framework Base Classes provides developers with a rich set of functionality (in classes and interfaces) that they can use to help them develop applications with lesser code.  These classes and interfaces are organized into namespaces.  Examples of popular namespaces would be System.Collections, System.Data, System.Diagnostics, System.IO, System.Math, System.Reflection, and System.Security.

Windows Forms is the user interface services provided by .NET Framework in building windows-based applications.  Smart client applications with rich user interface are now more practical under .NET, even for a large number of users.

ASP.NET is the part of .NET that provides services for developing web-based applications.  Web Forms and Web Services are part of ASP.NET.

Web Forms is used to develop browser-based user interfaces and much like in a standard Visual Basic form, code is separated from the layout and properties information of the user interface elements.  Before in classic ASP, code is all over the HTML page.

Web Services allows programs to talk to each other directly over the web using the SOAP (Simple Object Access Protocol) standard.  With web services, software functionality are exposed over the web as resources for building your distributed applications.

It is worth noting that ASP.NET 2.0 has been significantly improved from previous versions with more built-in functionality making it possible to write far less code.  Also ASP.NET components for user authentication are already prebuilt.

XML is also at the center stage in the .NET Framework as most of the underlying technologies are dependent on XML.  It is used as a glue to tie pieces together internally and externally.

Some of the important changes in .NET 2.0 are the following: partial classes which allows coding for a class into multiple code modules; generics which allows generic collections to handle specific data types, declared when collection is created; ClickOnce which is a new technology for deploying across the web, with automatic updating; My class which provides easy access to most commonly used classes in .NET; nullable types; operator overloading; IsNot and Using keyword.

Access 2003: A journey towards mastering Access 2003

Access is the first database that I worked on, not SQL Server.  I started with version 97.  Now with version 2007 available, you ask why master 2003 when there is already 2007.  For one it’s still relatively new and companies especially small to mid-size ones where I cater to most, don’t jump hastily to new technologies so there should be plenty of pre-2007 Access applications around to work on.  My purpose in this journey is to eventually get certified with Access 2003 so wish me luck.

VB 2005: A journey towards mastering Visual Basic 2005

My last project involved using Visual Basic 2005.  This is the latest version of VB.NET.  I have used Visual Basic before starting with version 4.0.  In fact I got certified a long time ago, November 2001 to be exact, as a Microsoft Certified Professional (MCP) by passing the exam Designing and Implementing Desktop Applications with Microsoft Visual Basic 6.0.  Now that I am using VB 2005, it’s time for me to master this technology and hopefully get back on track with my certification.  I recently bought a book titled Professional VB 2005 by various authors and I will be reading this book to help me with my journey and of course this blog will serve as my notes pad.  So here we go!

SQL Server 2005: Aggregate Functions

Aggregate functions (e.g. AVG, MIN, MAX, COUNT, etc.) can be in a SELECT statement without the GROUP BY clause.  Without the GROUP BY clause in the SELECT statement will apply the aggregate function to the entire result set.

Also all aggregate functions, except for COUNT(*), ignore NULLs.  So you need to be sure that when you use an aggregate function on a column, you want any NULL values in your column to be excluded in the aggregation, meaning they will not be included in the function.

SLQ Server 2005: Operators you can use in the WHERE clause

Besides the standard comparison operators (=, >, <, etc.), the boolean operators (AND, OR, NOT) and the BETWEEN operator, you can also use LIKE, IN, ALL, ANY, SOME, and EXISTS.


Use this when you want to match the value of a column to a string with wildcard characters specified after this keyword.  You use % to mean 1 or more characters and _ to mean just 1 character.  Enclosing characters in [] indicates that any of the characters inside is OK.  Specifying ^ before a character excludes that character.


Use this if you want to match the value of a column to a list of values specified after this keyword.  You can also use this with subqueries.


Used in conjunction with a comparison operator (e.g. =, >, <).  Use this if you want to compare the value of a column to all, any or some of the values in a subquery.

Below is an example usage (the default is ALL):

<column | expression> (comparison operator) <ANY | SOME> (subquery)


Use this to check if a subquery returns at least 1 row.