vb.net中制作二级联动combobox 省市
发布网友
发布时间:2024-10-20 13:38
我来回答
共2个回答
热心网友
时间:2024-11-14 14:58
imports system.data
imports system.data.oledb '假设数据库是ACESS
private sub from_load(...........)
dim myconnection as new oledbconnection _
("provider=microsoft.jet.oledb.4.0;data source=(路径+)CityDB.mdb")
dim mydataser as new dataset()
dim myadapter as oledbdataadapter
myconnection.open()
myadapter=new oledbdataadapter("select * from CityTable",nyconnection)
myadapter.fill(mydataset,"CityTable")
combobox1.datasource=mydataset
combobox1.displaymember="CityTable.Privence "
combobox2.datasource=mydataset
combobox2.displaymember="CityTable.City"
myconnection.close()
end sub
热心网友
时间:2024-11-14 14:59
给我发邮件,
我有原代码实例
dzeke@qq.com