Archive For November 2007

Sql JOINS and the Sql Server Management Studio Query Designer

calendar_today 28 November 2007 13:19

SQL SQL Server Express ADO.NET

There are a whole bunch of articles, blog entries and tutorials that seek to explain how SQL JOINS work. Some of them are excellent, and others are just confusing. The reason I am adding my go at trying to clarify JOINS to the mix is to highlight how proper use of the tools available to you can seriously reduce the chances of getting the JOIN syntax or type wrong. Since JOINS are all about how to relate data from one table to another, I thought it appropriate to illustrate the subject using Parents and Children (who may, or may not be related to eachother). So let's meet the families.

Search Engine-Friendly Custom Paging with the GridView and LINQ to SQL

calendar_today 20 November 2007 22:54

LINQ ASP.NET 3.5 ASP.NET Web Forms

The main problem I find with the built-in paging functionality offered by the GridView control is that the paging links are managed by Javascript. This is a bit awkward for people who disable, or don't have Javascript in their browser, but more importantly, the links can't be triggered by search engines. If you rely on the GridView to paginate links to content, this can prove disastrous, and much of your content will be inaccessible to search engines. Motivated by Scott Guthrie's series of blog entries on LINQ to SQL, available in the .Net 3.5 framework, I set about getting some custom paging working with html paging links.

Migrating from Sql Server to Access in ASP.NET

calendar_today 16 November 2007 10:45

MS Access ADO.NET

Yes, you did read that correctly. Here's the situation: you know that Sql Server is by far the superior database system (if indeed MS Access can be called a database system). You also know that MS Access databases are not recommended as a data store for web applications. You are comfortable with Sql Server, and haven't really looked at Access for years - if at all. But now, your boss or your client wants you to use it in the next project.

How to get your forum question answered - avoid thread-jacking

calendar_today 13 November 2007 12:33

ASP.NET 2.0

If you have just been directed to this page, it may be because you have just thread-jacked. If you are not sure what that means, read on for an explanation, and some guidance.

An ASP.NET Search Engine with MS Access for optional search criteria

calendar_today 12 November 2007 15:15

ASP.NET 2.0 MS Access ADO.NET ASP.NET Web Forms

Creating a search interface for one user-supplied value is pretty straightforward: a TextBox for input, a Button and some SQL that searches one or more fields where the values are LIKE '%' + @searchterm + '%' is all that is needed. While it works, this approach is not very flexible. For example, what if you wanted to search for an Employee whose last name contains "a", and don't want those where the first name or city contains "a"? The traditional solution to this is to dynamically construct the SQL statement based on what values were passed by the user. However, building the SQL string can get repetitive, boring and messy. Here is a cleaner way to allow the user to narrow down searches across multiple criteria with the use of optional parameters, and just 3 lines of programming code.