只想在listbox上显示餐饮类别的商家,但是会显示全部商家
Do While rs.EOF = False
eat = "select shopname from shop where sort ='" & 餐饮 & "'"
rs.Open eat, cn, adOpenStatic, adLockOptimistic
lsteat.AddItem rs.Fields("shopname")
rs.MoveNext
Loop
[解决办法]
eat = "select shopname from shop where sort ='" & 餐饮 & "'"
rs.Open eat, cn, adOpenStatic, adLockOptimistic
Do While not rs.EOF
lsteat.AddItem rs.Fields(0)
rs.MoveNext
Loop