Hi, You can check this Add the following code before Public Class Form1 Code: Imports MySql.Data.MySqlClient Then add the following declaration below Public Class Form1 Code: Dim conn As New MySqlConnection Then add the following Code: Public Sub connect() Dim DatabaseName As String = "Database NAme" Dim server As String = "ip address here" Dim userName As String = "sarmasar here" Dim password As String = "password here" If Not conn Is Nothing Then conn.Close() conn.ConnectionString = String.Format("server={0}; user id={1}; password={2}; database={3}; pooling=false", server, userName, password, DatabaseName) Try conn.Open() MsgBox("Connected") Catch ex As Exception MsgBox(ex.Message) End Try conn.Close() End Sub Call the connect sub when the form first loads: Code: Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load connect() End Sub Thanks
Hi Welcome to this forums sites. Here you can find a lot of information about your question. But I have doesn’t have much information about it. For more information please visit here. TOP 5 INTERACTIVE SOCIAL MEDIA MARKETING TOOLS