0
有什麼解決方法嗎? Express不支持擴展,我應該怎麼做才能使用連接器?vs 2012中的MySQL連接器快遞
有什麼解決方法嗎? Express不支持擴展,我應該怎麼做才能使用連接器?vs 2012中的MySQL連接器快遞
Imports MySql.Data.MySqlClient
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
'Project| Add Reference|C:\Program Files (x86)\MySQL\Connector NET 6.6.5\Assemblies\v4.0\MySql.Data.dll
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Me.Tag = "Server=MY-PC;Database=myDB;User Id=" & TextBoxUID.Text & ";Password=" & TextBoxPWD.Text & ";Connection Timeout=20"
Try
Dim connection As New MySqlConnection(Me.Tag.ToString)
connection.Open()
connection.Close()
MsgBox("Connection is okay.")
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
End Class
http://stackoverflow.com/questions/12684047/mysql-datasource-on-visual-studio-2012 – paul