Using MySQL with Your ASP.NET Applications

By Leidago Noabeb


[next]

This article explains how to use the very popular open source MySQL database server with ASP.NET. Often, it is very difficult to find open source software that works so well with commercial software, such as those produced by Microsoft. However, Microsoft has made it easy to integrate MySQL with your Visual Studio 2008 projects.

The article uses a sample user login application to demonstrate how easy it is to use MySQL with ASP.NET. For the program to work, you will need Visual Studio 2008, MySQL 5.1.34, and MySQL Connector/Net installed. You also should have some knowledge of ASP.NET and the Visual Studio environment.

The MySQL Database

For our login application, let's create a database called asplogin and add one table called users. Below is some SQL for you to copy and paste into your MySQL Client application:

Simply run this code and you should have a database with a table called users. The table takes a username and password and has sample data.


[next]