0
我想從數據庫初始化一維數組,但它不初始化。從數據庫初始化一維數組
Dim cmdstring As String = "SELECT DISTINCT(category) from inventory"
command = New MySqlCommand(cmdstring, connection)
Dim reader As MySqlDataReader
reader = command.ExecuteReader(CommandBehavior.CloseConnection)
While reader.Read()
Dim xValues() As String = reader("category")
End While
connection.Close()
[Visual Basic中的數組](https://msdn.microsoft.com/en-us/library/wak0wfyt.aspx) – Plutonix 2015-03-03 00:44:03
我已更正您的帖子的格式和幾個拼寫錯誤。還請在您的問題中包含確切的錯誤消息。 – 2015-03-06 16:54:18