Welcome to part 2 of this tutorial on how to execute queries requiring parameters from Microsoft Access. As previously mentioned in part 1, Microsoft Access is probably one of the most popular small scale application databases in use today, and is therefore the topic of discussion amongst many developers.
One of the surprising aspects of Visual Studio.NET 02/03 is that it did not come with an easy way to integrate Microsoft Access queries. With full support of SQL stored procedures the data wizards in Visual Studio.NET made it a breeze to program create/update/view/delete functionality automatically and will even create the required stored procedures for you.
Hence the purpose of this tutorial is 2-fold: 1 is to demonstrate how to connect to a MS Access database and execute queries which require parameters, and 2 is to implement this functionality in a scalable 3-tier design using class separation.
In part 1 of this tutorial we covered the database creation, setting up the ASP.NET project, connecting to the Access database, how to create the 3 tier application, and how to execute an MS Access query to return a set of data. This query did not require a parameter however.
During part 2 of this tutorial we will expand on our demonstration application by creating a create and update query, both of which require parameters. We will create an interface in order to visually see the create and update process on a WebForm.
Visual Studio .NET 02/03 running ASP.NET version 1.1 is required for this tutorial. A version of MS Access is also required. Both VB.NET and C# code samples will be provided