ds = SelectRoom()
With cbbroom
.DataSource = ds.Tables("Building")
.DisplayMember = "room"
.ValueMember = "room"
.SelectedValue = "กรุณาเลือก"
End With
Code (VB.NET)
Public Function SelectRoom() As DataSet
strcon = "Select 'กรุณาเลือก' as room UNION Select room from Building"
ds = New DataSet
da = New SqlDataAdapter(strcon, conn)
da.Fill(ds, "Building")
Return ds
End Function