cjard
Well-known member
- Joined
- Apr 25, 2006
- Messages
- 7,081
- Programming Experience
- 10+
... I have a set of tables such that:
[bankCustomer.accountSortcode]M = 1[banksTable.sortcode]
[banksTable.addressID]1 = M[addressesTable.addressID]
a bank is identified by its sort code, many customers may have the same sortcode indicating they are a customer of the one bank hence the relation is M:1
the addresses table is used by several other tables who also need to store addresses, and additionally we keep every known address so if a bank moves, it gets a new address detail, but the same id. this table has a compound primary key of ID plus a date field of ewhen the address came into being. hence the relationship is... bank 1:M address
in my dataset these are represented a little differently. i have chosen to represent them in this way:
[bankCustomer.accountSortcode]F = 8[banksTable.sortcode]
[banksTable.addressID]F = 8[addressesTable.addressID]
where F is the little key symbol, and 8 is the little infinity symbol. I.e. i have reversed the relationship of the bankCustomers and banks.
this is because i want to have the customers screen driving the banks table.. i will type a sort code into the customer screen, and as soon as it reaches 6 digits i will:
look up the banks table for that sortcode. there should be either 1 or 0.
if there is 1 then the bank is known. the address id will be read and the addresses known for the bank will be loaded.
so far IO have gotten to the stage of:
clearing the customer datatable
accepting the changes
adding a new row with blank empty strings in place for all the primary key values in the customer datatable
implementing the keyhandler such that when the sort code is typed in, the banks table is filled with a valid bank (i am typing a valid sort code)
and following on from a above the addresses are populated.
herein lies my problem.. the fields on the form are not showing anything for the bank or address data
-
as a test i put 3 datagrid on the form and bound them directly to the tables the form uses
i put another 2 and bound them to the relations between the tables
-
the 3 that are bound to the datatables show exactly the data that i want them to show. the two that are bound to the relations, are blank
-
at what part has my process failed such that:
I need to disable constraints on my dataset immediately before i fill the bank data in (after getting the sortcode from the user) otherwise it complains
When i disable constraints, the data i want to see is loaded into the tables, but the relationship is broken such that i cannot see the data
Is it because I have typed into the textbox, and the underlying datatable is not committed?
[bankCustomer.accountSortcode]M = 1[banksTable.sortcode]
[banksTable.addressID]1 = M[addressesTable.addressID]
a bank is identified by its sort code, many customers may have the same sortcode indicating they are a customer of the one bank hence the relation is M:1
the addresses table is used by several other tables who also need to store addresses, and additionally we keep every known address so if a bank moves, it gets a new address detail, but the same id. this table has a compound primary key of ID plus a date field of ewhen the address came into being. hence the relationship is... bank 1:M address
in my dataset these are represented a little differently. i have chosen to represent them in this way:
[bankCustomer.accountSortcode]F = 8[banksTable.sortcode]
[banksTable.addressID]F = 8[addressesTable.addressID]
where F is the little key symbol, and 8 is the little infinity symbol. I.e. i have reversed the relationship of the bankCustomers and banks.
this is because i want to have the customers screen driving the banks table.. i will type a sort code into the customer screen, and as soon as it reaches 6 digits i will:
look up the banks table for that sortcode. there should be either 1 or 0.
if there is 1 then the bank is known. the address id will be read and the addresses known for the bank will be loaded.
so far IO have gotten to the stage of:
clearing the customer datatable
accepting the changes
adding a new row with blank empty strings in place for all the primary key values in the customer datatable
implementing the keyhandler such that when the sort code is typed in, the banks table is filled with a valid bank (i am typing a valid sort code)
and following on from a above the addresses are populated.
herein lies my problem.. the fields on the form are not showing anything for the bank or address data
-
as a test i put 3 datagrid on the form and bound them directly to the tables the form uses
i put another 2 and bound them to the relations between the tables
-
the 3 that are bound to the datatables show exactly the data that i want them to show. the two that are bound to the relations, are blank
-
at what part has my process failed such that:
I need to disable constraints on my dataset immediately before i fill the bank data in (after getting the sortcode from the user) otherwise it complains
When i disable constraints, the data i want to see is loaded into the tables, but the relationship is broken such that i cannot see the data
Is it because I have typed into the textbox, and the underlying datatable is not committed?