Dim ds As New DataSet
Dim sql As String = "select * from yaodian"
Dim mysql As New SqlCommand(sql, sqlconn)
sqlconn.Open()
Dim MyCommand As SqlDataAdapter = New SqlDataAdapter(sql, sqlconn)
MyCommand.Fill(ds, "yaodian")
'绑定数据到数据表格
Me.DropDownList1.DataSource = ds.Tables("yaodian").DefaultView
Me.DropDownList1.DataTextField = "药店名称"
Me.DropDownList1.DataBind()
Dim sql As String = "select * from yaodian"
Dim mysql As New SqlCommand(sql, sqlconn)
sqlconn.Open()
Dim MyCommand As SqlDataAdapter = New SqlDataAdapter(sql, sqlconn)
MyCommand.Fill(ds, "yaodian")
'绑定数据到数据表格
Me.DropDownList1.DataSource = ds.Tables("yaodian").DefaultView
Me.DropDownList1.DataTextField = "药店名称"
Me.DropDownList1.DataBind()