StrServer - это IP другого p c, который подключен к локальной сети, а также сервер включен в другой P C.
Вот мой код
Imports MySql.Data.MySqlClient
Public Class Form1
Dim strServer As String = "192.168.1.2"
Dim strDB As String = "lab_utilization"
Dim struser As String = "root"
Dim strPw As String = ""
Dim cs As String = "Server=" & strServer & ";Port=3306;Database=" & strDB & ";uid=" & struser & ";Pwd=" & strPw & ";"
Dim con As New MySqlConnection(cs)
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim cmd As New MySqlCommand("insert into PC values('Adi101','Adi101')", con)
cmd.ExecuteNonQuery()
End Sub
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
con.ConnectionString = cs
con.Open()
End Sub
End Class
При выполнении кода я получаю следующую ошибку на con.open ()
Could not load or assembly 'Renci.SshNet, version=2016.1.0.0, culture=neutral, publickeytoken=1cee9fbde3db106' or one of its dependecies. the system cannot find the specified