- 追加された行はこの色です。
- 削除された行はこの色です。
*MySQLでADO.NET覚書 [#g9d5a6ce]
mysql-connector-net-6.9.6.msi
mysql-for-visualstudio-1.2.3.msi
をそれぞれインストールする
MySQLサーバーの文字セットはutf8で
以下.NET
Imports MySql.Data.MySqlClient
Public Class Form1
Private Sub frmProjectNew_Load(sender As Object, e As EventArgs) Handles Me.Load
End Sub
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
Using connection As New MySqlConnection(My.Settings.TestConnectionString)
Dim command As MySqlCommand = connection.CreateCommand()
Dim dr As MySqlDataReader
connection.Open()
command.CommandText = "SELECT * FROM tbl_test"
dr = command.ExecuteReader()
Do While dr.Read
cmbManager.Items.Add(dr("id_name"))
Loop
dr.Close()
connection.Close()
End Using
End Sub
End Class