Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
Imports MySql.Data.MySqlClient Public Class setupForm Private Sub TabPage1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim MysqlConn As MySqlConnection MysqlConn = New MySqlConnection() Dim dr As MySqlDataReader Dim cmd As New MySqlCommand MysqlConn.ConnectionString = "server=dbserver.com;" _ & "user id=vbnet;" _ & "password=dbpassword;" _ & "database=admin_merchantController" Try MysqlConn.Open() cmd.CommandText = "SELECT companyName FROM merchants WHERE merchantId = ?MID" cmd.Parameters.Add(New MySqlParameter("?MID", Form1.mMerchantId)) cmd.Connection = MysqlConn dr = cmd.ExecuteReader If dr.HasRows() Then dr.Read() myCompany.Text = dr(0) End If MysqlConn.Close() Catch myerror As MySqlException MessageBox.Show("Cannot connect to database: " & myerror.Message) Finally MysqlConn.Dispose() End Try
Join the community of 500,000 technology professionals and ask your questions.