-2

I have a database column, Province=(Punjab, Sindh, Blochistan, Sarhad) and other database table City=Fsd, Lahore, Multan, etc, and I have another database table city=Chiniot, Khushab, Tando, Adam, Khan, etc. Also another two more columns of city because I have four provinces, so I have four city tables.

If I select in combobox1 province=punjab, it should show Punjab cities in combobox2 like punjab=Fsd,Lahore,Multan etc. Same as another column when I select province "Sindh" in combobox1 then show all Sindh cities, like this sindh=Chinot, Khushab, Tando, Adam, Khan, etc.

Nathan Tuggy
  • 2,237
  • 27
  • 30
  • 38
  • Check this out: http://www.vbforums.com/showthread.php?518065-Master-Detail-(Parent-Child)-Data-binding-(-NET-2-0-WinForms) – jmcilhinney Aug 05 '15 at 03:00

1 Answers1

0

Your description is quite unclear, but it seems you have separate tables for cities in different provinces, and that's what is causing your problems. You should have only one table for cities and have the province as a column in that table. Then you can use the value from the combobox in the where clause for the cities table.

James Z
  • 12,209
  • 10
  • 24
  • 44