An Introduction to VB.NET and Database Programming

Where to Begin

The Recipe Application

For all you experts out there, move along, this is a beginner writing to other beginners. The first step to creating an application is to define what you want it to do. There are some basic features I want from my first ever Visual Basic.NET application and there are others that would be fun to try and add after I have learned more.

  • Store Recipes
  • List Ingredients and Instructions
  • Be searchable by Keyword, Ingredient, Preparation Time, or Calories **
  • Limit recipes and searches to those within a category (beef, chicken, breakfast, etc)
  • Allow the user to add, delete or update recipes
(** Not included in version 1.0)

Not the most thrilling application, but it should present several key learning points. To complete this application we will have to learn how to take input, retrieve information, display information, store information, and build an installer.

Where to Begin?

That is the question that all beginners have. I spent the better part of four days looking at the various and assorted books at my local super book store and cafe. I settled on Beginning Visual Basic .NET Databases by Forgey, Gosnell, and Reynolds and Murach's Beginning Visual Basic .NET by Anne Prince. These two books, I thought, would enable me to understand some of the basics of VB.NET and using databases with VB.NET.

The Murach book was an excellent source for the basics with source code for each application all contained on one page or several pages in a row. It was a good thing to not have to hunt through several pages of theory to find scattered code examples each time I had to check my code. Chapter 14 was dedicated to XML and provided me some insight into why I would want to possibly use an XML file to store the recipe data. The book was not in depth enough to show if I could do searches based on parts of the XML file or not. My design specs called for searching and this book did not assist me beyond the very basic parts of XML. I am a beginner, but there should have been more. I then moved on to the chapters about relational databases. Chapters 16, 17 and 18 in Murach's Beginning Visual Basic .NET were excellent for getting me into the basics of how to program an application with ADO.NET. I adopted the instructions in these chapters to work with a local access database instead of an SQL server.

You might also like...



Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“If Java had true garbage collection, most programs would delete themselves upon execution.” - Robert Sewell