W
Wingot
Hey,
I have an application codenamed WingFlex. It has a number of aspects to
it, but the prudent parts for this problem are all within the "Client"
Schema. The Client schema has three tables in it, on named Country, one
named MedicalCondition, and one named Customer. The Customer database
has five foreign keys in it, one to Country, one to MedicalCondition,
and three as self referential keys to Customer (BillTo, for where the
bill goes, EmergencyContact1, and EmergencyContact2).
I have created data entry views for Country and Medical Condition
without error, and have even added some hotkeys to make the data entry
easier. I can even enter the Country codes and Medical Condition ID's,
and the various self referentials, and these are all enforced by the SQL
Server.
What I am then trying to do is add some ComboBoxes (Dropdown boxes) that
display the Name field and have a value of the ID field for their
respective foreign key. But when I try to add the ComboBoxes and attach
the data, the are not looking up the data (If I use the Preview Data
option it works perfectly).
I have attempted to add another BindingSource, for Country. The
DataMember is Country, DataSource is wingFlexClientDataSet. This is the
same DataSet that is being used for the customerBindingSource that
works. wingFlexClientDataSet is a DataSet that includes the complete
Client Schema, which includes Customer, Country, and MedicalCondition.
When I then set up a Data Binding for the DataSource
FK_Customer_Country, which has the Customer.Country Foreign Key linked
to the Country.CountryID Primary Key. The DisplayMember is Country, and
the ValueMember is Country. Under (DataBindings), the SelectedValue is
customerBindingSource. One thing that I have noticed is that the
ValueMember and DisplayMember can only be set to the fields within the
Customer BindingSource, even with the Data Binding set to a field in the
Country table (FK_Customer_Country).
However, even with the above setup, which so far as I can tell is
correct, the combobox displays as blank. Nothing is displayed, and
nothing is selectable.
I can't think of a way to send a copy without posting the complete
solution (which I have replicated in a 1.12MB test solution) as it
doesn't involve any non IDE generated code. Even if I did post the
solution, the Database would still be missing, and I presume this would
be a problem.
Any idea what is going wrong?
Regards,
Wingot
I have an application codenamed WingFlex. It has a number of aspects to
it, but the prudent parts for this problem are all within the "Client"
Schema. The Client schema has three tables in it, on named Country, one
named MedicalCondition, and one named Customer. The Customer database
has five foreign keys in it, one to Country, one to MedicalCondition,
and three as self referential keys to Customer (BillTo, for where the
bill goes, EmergencyContact1, and EmergencyContact2).
I have created data entry views for Country and Medical Condition
without error, and have even added some hotkeys to make the data entry
easier. I can even enter the Country codes and Medical Condition ID's,
and the various self referentials, and these are all enforced by the SQL
Server.
What I am then trying to do is add some ComboBoxes (Dropdown boxes) that
display the Name field and have a value of the ID field for their
respective foreign key. But when I try to add the ComboBoxes and attach
the data, the are not looking up the data (If I use the Preview Data
option it works perfectly).
I have attempted to add another BindingSource, for Country. The
DataMember is Country, DataSource is wingFlexClientDataSet. This is the
same DataSet that is being used for the customerBindingSource that
works. wingFlexClientDataSet is a DataSet that includes the complete
Client Schema, which includes Customer, Country, and MedicalCondition.
When I then set up a Data Binding for the DataSource
FK_Customer_Country, which has the Customer.Country Foreign Key linked
to the Country.CountryID Primary Key. The DisplayMember is Country, and
the ValueMember is Country. Under (DataBindings), the SelectedValue is
customerBindingSource. One thing that I have noticed is that the
ValueMember and DisplayMember can only be set to the fields within the
Customer BindingSource, even with the Data Binding set to a field in the
Country table (FK_Customer_Country).
However, even with the above setup, which so far as I can tell is
correct, the combobox displays as blank. Nothing is displayed, and
nothing is selectable.
I can't think of a way to send a copy without posting the complete
solution (which I have replicated in a 1.12MB test solution) as it
doesn't involve any non IDE generated code. Even if I did post the
solution, the Database would still be missing, and I presume this would
be a problem.
Any idea what is going wrong?
Regards,
Wingot