Thread: Question Populating combobox
View Single Post
  #7 (permalink)  
Old 10-21-2008, 8:13 AM
cjard's Avatar
cjard cjard is offline
VB.NET Forum All-Mighty
.NET Framework: .NET 2.0 (VS 2005)
 
Join Date: Apr 2006
Age: 65
Posts: 6,442
Reputation: 807
cjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond reputecjard has a reputation beyond repute
Default

Heh, yeah, i do sound like a bit of a broken record with DW2.. but so often I find people following old/out of date tutorials etc..

In this case if you have many combos, I would be tempted to make things a little simpler and jsut have one DataTable/TableAdapter with a Display and Value columns, then the TA can have several related queries:

SELECT Name as Display, ID as Value FROM tblStates
SELECT Name as Display, ID as Value FROM tblProvinces WHERE StateID = @StateID
SELECT Name as Display, ID as Value FROM tblTowns WHERE ProvinceID = @ProvinceID

...
__________________
DW1 DW2 DW3 DW4 DNU PQ
Reply With Quote