I have a SQL database with two tables: Contacts and Companies
On form where the user should edit the Contact details there is a combo box
from which he can select the contact's company.
I am filling dataset using a strored procedure.
To the moment I have managed to display the name of the company currently
assigned to the contact.
What I want the combo box to display the list of all companies in Companies
table, so he can select to which company the contact belongs.
I don't know two things:
1. How to define the SQL statment in my stored procedure so the Dataset is
filled with all compnanies from the Companies table.
2. How to bind the Combo box to achieve the same
My tables contain these fields:
Table Contacts
ContactID
FirstName
LastName
CompanyID
Table Companies
CompanyID
CompanyName
|