2014年7月13日 星期日

[RESOLVED] Dropdown query


Hi,


Table: Test


Columns:


TestTbl: Id int, Lastname char(50), Firstname char(50), DLevel char(50) 


Query assigned : Id - 1, DLevel - DLeader, Lastname -
Smith, Firstname - John


Controls: I have query something like: one dropdown list control that contains data from sql 


I want a dropdown that display John Smith from a DLeader level. 



Thanks.



What do you need help with exactly? What problem are you facing? 



My concern is how can I view the assigned Dlevel "DLeader" (where John Smith was assigned as the DLeader) into the dropdown control? 


my dropdown value will contain "John Smith" (already stored into the db)



I already got this, the snytax is: SqlCommand objCmd = new SqlCommand("Select * from Table where
DLevel='DLeader'", objConn);


setting DLevel to value DLeader populates all records belonging to the DLeader level. 



Hope this helps. Thanks.



沒有留言:

張貼留言