![]() ![]() password: The password of the user of the mysql database server.user id: The user of the mysql database server.Data Source: We have our database in our local machine, thus I have used “localhost”, if you have your DB at some other computer connected by LAN to your machine, you will put the IP address of that machine instead of localhost.Here, look at the connection string which as currently have 5 parts as follows ![]() The code looks like the following dbconn = New MySqlConnection("Data Source=localhost user id=root password=demo port=3310 database=vb_mysql") Try dbconn.Open() Catch ex As Exception MsgBox("Connection Error: " & ex.Message.ToString) End Try We will open the connection to the DB in the load event of our form which now named as form1 by default. Okay, now we are going to make the connection.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |