I created a windows form that has a combo box that is supposed to be filled via fields from a database stored procedure. How do i di this
1. Create the db connection
2. Fill the combo box from the SP
3. Do i create the connection in the combo box event handler Please help me.
I am new to this and would appreciate any guidance... This is a windows form.
Thanks in advacve.

Create Database Connection & Fill combo box
Asmodyne
As for DataBinding it, it's really easy, just set the .DataSource Property of the ComboBox to the DataTable. Then, (or before, shouldn't matter), set the .ValueMember and .DisplayMember Properties of the ComboBox to the fields you want to be the Value field and the Display field (respectively)
Let us know if you still can't get it
Tiago Fusco
Nitin Mittal
1. Create the db connection
2. Create a command object
3. Set properties of the command object, including the connection object, sp name, etc.
4. Set any parameters required by the sp
5. Execute the sp, probably using the ExecuteReader method
6. Bind the data reader to the combo box
Sounds complicated, but it's really not. What database are you using What parameters, if any, does the sp need
Don
Dali Hammadi
quan
Don