*MySQLでADO.NET覚書 [#g9d5a6ce]
 
 mysql-connector-net-6.9.6.msi
 mysql-for-visualstudio-1.2.3.msi
 をそれぞれインストールする
 MySQLサーバーの文字セットはutf8で

 Imports MySql.Data.MySqlClient
 
 Public Class Form1
    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


トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS