Monday, 7 March 2011

Connecting VB 2010 to a MySQL DB

MySQL databases are wildly used by individuals and large businesses, it's free, easy to use and pretty much brilliant.

You have to install both MySQL and the connector (needed to import different MySQL tools to vb)

This post will show you what version to download, and show you how to connect to it.

First of all download and install the latest version of MySQL
MySQL Server Download

Once installed and configured install the MySQL Connector/Net - ADO.Net driver
Connector/Net driver

During installation select the typical install

Now to connect Visual Basic to your MySQL database

On your new project click Project > Add Reference...

Click the .Net tab and select 'MySQL.Data'

Now click OK, congratulations you have connected VB and MySQL - in a sense

This now gives you the ability to connect to you MySQL database via and manipulate the database using commands created in VB - Which of course I shall show you in the not too distant future.

Further more..:
If you would like to see a list of the commands available after adding the reference click the following in VS

Following this open the references folder and then double click 'MySQL.Data'

Friday, 4 March 2011

Creating a new project

In order to create a new Visual Basic project you must first launch Microsoft Visual Studio.

Once this is done you can select 'New Project...' to start your new project

In the following window select other languages > Visual Basic

Select 'Windows Forms Application'

Give your project a name and then click okay.

Congratulations, you have created your first Visual Basic Project!

You will now have a blank form in which to start creating your program.


I have created this blog in order for people to learn visual basic commands and features so that they can create their own programs using visual basic