Visual Studio错误系统.invalidoperationException
我正在尝试将我的MySQL Server与XAMMP连接到Visual Studio上的简单视觉基本形式。 这是代码
Imports MySql.Data.MySqlClient
Public Class Form1
Private conexion As New MySqlConnection("server=127.0.0.1;database=juegos_de_la_nba1;user=root;passwords=''")
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Try
conexion.Open()
MsgBox("la conexion ha sido exitosa")
Catch ex As Exception
MsgBox(ex.Message)
Finally
If conexion.State = ConnectionState.Open Then
conexion.Close()
End If
End Try
End Sub
End Class
是,此错误出现在此处输入图像描述
i am trying to connect my mysql server WITH XAMMP to a simple visual basic form on visual studio.
here's the code
Imports MySql.Data.MySqlClient
Public Class Form1
Private conexion As New MySqlConnection("server=127.0.0.1;database=juegos_de_la_nba1;user=root;passwords=''")
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Try
conexion.Open()
MsgBox("la conexion ha sido exitosa")
Catch ex As Exception
MsgBox(ex.Message)
Finally
If conexion.State = ConnectionState.Open Then
conexion.Close()
End If
End Try
End Sub
End Class
the thing is that this error appears enter image description here
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论