如何将ComboBox
与数据库值相关联?尝试以下代码时收到错误消息:
Dim READER As MySqlDataReader
Try
tilkobling.Open()
Dim Query As String
Query = "select * from g_oops_22.minsideNy"
Command = New MySqlCommand(Query, tilkobling)
READER = Command.ExecuteReader
While READER.Read
Dim blodLokasjon = READER.GetString("blodgivninglokasjon")
ComboBox1.Items.Add(blodLokasjon)
End While
tilkobling.Close()