Imports System.Data.OleDb
Dim strSQL As New String
Dim cmd As OledbCommand
Dim Dr As OleDbDataReader
connection.Open()
strSQL = "select Myfield from MyTables"
cmd = New OleDbCommand
cmd.CommandText = strSQL
cmd.Connection = connectionDB
Dr = cmd.ExecuteReader
While (Dr.Read())
Combobox1.Items.Add(Dr("Myfield"))
End While
cmd.Dispose()
Connection.Close()
ไม่มีความคิดเห็น:
แสดงความคิดเห็น