How to Connect the VB 2005 to MySQL

Here is how to connect Visual Basic.Net to the MySQL database:
1. In the project - add reference - on the tab. Net - find MySql.Data - click OK
2. In the namespace - imports mysql.data.mysqlclient
3. In the form load or in the module or whatever form
type this code to connect with mysql

1
2
3
4
5
6
Dim myString As StringmyString = "server=localhost; " _
& "uid=root;" _
& "pwd=;" _
& "database=mysql;"
Dim conn As New MySqlConnection(myString)
conn.Open()

Process’s command is same as our command to do SQL Server or Access

Tags: , , , ,

5 Responses to “How to Connect the VB 2005 to MySQL”

  1. [...] a correct information about the data (note : this query will not working in previous version of MySQL 6, paradox database, and interbase 6) : 1 2 3 4 5 6 7 8 9 10 SELECT a.productid, a.descriptions, [...]

  2. Pillspot.org. Canadian Health&Care.Special Internet Prices.No prescription online pharmacy.PillSpot.org. Vitamins@buy.online” rel=”nofollow”>.…

    Categories: Eye Care.Pain Relief.Anxiety/Sleep Aid.Stomach.Vitamins/Herbal Supplements.Skin Care.Antidiabetic.Antiviral.Womens Health.Mens Health.Stop SmokingAnti-allergic/Asthma.Mental HealthBlood Pressure/Heart.Weight Loss.Antidepressants.Antibi…


Leave a Reply