J
Jon
I am using a dropdown control and populating it from an SQL select, like
below
SQL = "SELECT RegionNumber, Description FROM SalesRegion WHERE DateClosed IS
NULL"
cmd.Connection = dbCon
cmd.CommandType = CommandType.Text
cmd.CommandText = SQL
drTemp = cmd.ExecuteReader(CommandBehavior.SequentialAccess)
While drTemp.Read
Me.ddCust.Items.Add(drTemp.GetString(1))
End While
If Not drTemp.IsClosed Then drTemp.Close()
I really want to do something like this (from VB6)
ddCust.AddItem "BOB"
ddCust.ItemData(0) = 15
I want the Description from the select to be the text in the dropdown, yet I
still need to know what the RegionNumber is. What would be the best
solution to this?
Thanks!
below
SQL = "SELECT RegionNumber, Description FROM SalesRegion WHERE DateClosed IS
NULL"
cmd.Connection = dbCon
cmd.CommandType = CommandType.Text
cmd.CommandText = SQL
drTemp = cmd.ExecuteReader(CommandBehavior.SequentialAccess)
While drTemp.Read
Me.ddCust.Items.Add(drTemp.GetString(1))
End While
If Not drTemp.IsClosed Then drTemp.Close()
I really want to do something like this (from VB6)
ddCust.AddItem "BOB"
ddCust.ItemData(0) = 15
I want the Description from the select to be the text in the dropdown, yet I
still need to know what the RegionNumber is. What would be the best
solution to this?
Thanks!