sql1 = "SELECT distinct(Area) FROM (" + tablename + ")"
Dim ds_area As New DataSet
Dim da_area As New OleDb.OleDbDataAdapter(sql1, MyConnection)
da_area.Fill(ds_area)
Me.ListBox1.DataSource = Nothing
Me.ListBox1.Items.Clear()
Me.ListBox1.DataSource = ds_area.Tables(0)
Me.ListBox1.DisplayMember = "Area"
Me.ListBox1.ValueMember = "Area"
Me.ListBox1.SelectedIndex = 0
Me.cmbArea.Items.Insert(0, "Select All")
For i = 0 To ds_area.Tables(0).Rows.Count() - 1
Me.cmbArea.Items.Add(ds_area.Tables(0).Rows(i)(0).ToString)
Next
Me.cmbArea.SelectedIndex = 0
Catch ex As Exception
MsgBox(ex.Message)
End Try
は、エラーレポートは値なし - エクセル
da_area.Fill(ds_area)が見つかりcannt - コードは、作業 –
この行に示すエラーを文字を持つファイルの列は、今では数値のために必要です –