A
amy
Hi all,
This is a school project. I used SQLServer & am trying to
create my GUI in .NET. Here's my problem:
I'm trying to bind a datasource to a combobox control on
my Advertising form so the user is forced to choose from a
list of companies (the company name field has a database
constraint that it cannot be null). I used a wizard to
create my data adapters & the dataset; both tables
(Company & Advertising) are in the dataset. I set the
datasource & displaymember to the Company info. When I go
to run the form the Company Names show up in the combobox
like I want; however, when I try to save the data to the
Advertising Table it tells me it can't because the
CompanyName field cannot be null. How do I get my record
to update to the Advertising table?
Here are my two tables:
Company (Parent)
field name: CompanyName (PK)
Advertising (Child)
field name: CompanyName (FK)
Any help is greatly appreciated. Thanks in advance.
Amy
This is a school project. I used SQLServer & am trying to
create my GUI in .NET. Here's my problem:
I'm trying to bind a datasource to a combobox control on
my Advertising form so the user is forced to choose from a
list of companies (the company name field has a database
constraint that it cannot be null). I used a wizard to
create my data adapters & the dataset; both tables
(Company & Advertising) are in the dataset. I set the
datasource & displaymember to the Company info. When I go
to run the form the Company Names show up in the combobox
like I want; however, when I try to save the data to the
Advertising Table it tells me it can't because the
CompanyName field cannot be null. How do I get my record
to update to the Advertising table?
Here are my two tables:
Company (Parent)
field name: CompanyName (PK)
Advertising (Child)
field name: CompanyName (FK)
Any help is greatly appreciated. Thanks in advance.
Amy