我有一个Sub,它带来一个数组并在Mysql命令中使用它。
数组是COLUMN,它包含例如
Dim COLUMN As String = {"column1","column2","column3"}
TABLE就像“SomeTable”一样字符串
Public Sub FillComboBox(ByVal TABLE As String, ByVal COLUMN As Array, ...)
Dim StrCOLUMN As String = String.Join(",", COLUMN)
Dim sqlQuery As String = "SELECT " & StrCOLUMN & " FROM " & TABLE
[...]
End Sub
这是我的问题
我期待的是像
"SELECT column1,column2,column3 FROM SomeTable"
我得到像
这样的东西"SELECT System.String[] FROM SomeTable"
错误在哪里?
答案 0 :(得分:0)
我确信COLUMN是一个阵列,就像Visual Studion 2008一样。但是自Visual Studion 2015以来似乎有所不同
Public Sub FillComboBox(ByVal TABLE As String, ByVal COLUMN As String(), ...)
Dim StrCOLUMN As String = String.Join(",", COLUMN)
Dim sqlQuery As String = "SELECT " & StrCOLUMN & " FROM " & TABLE
[...]
End Sub