Master Detail example
- FlowHeater-Team
- Topic Author
- Offline
- Admin
Less
More
8 years 4 months ago - 8 years 4 months ago #2740
by FlowHeater-Team
Best wishes
Robert Stark
Did this answer your question? We would be grateful if you provide a brief comment as feedback. It may also help others who may have encountered a similar problem.
Master Detail example was created by FlowHeater-Team
Hello,
I need to update an Access Database from another Access Database – both DB’s have identical schemas.
Imagine on the READ side
Table = Customer
CustID CustName
1 Microsoft
2 Apple
3 FlowHeater <<<<<<< A NEW CUSTOMER ON THE READ SIDE
Table = CustAddress
AddID CustID (Foreign Key) AddressLine1 AddressLine2
1 2 Somewhere United States
2 1 Redmond United States
3 3 Bischberg Germany
Table = CustContact
ContID CustID (Foreign Key) Name
1 1 Bill Gates
2 3 Robert Stark
And on the WRITE Side …
Table = Customer
CustID CustName
1 Microsoft
2 Apple
3 Google <<<<<<< CustID 3 – 5 have already been used on the WRITE side
4 …..
5 ……
6 FlowHeater <<<<<<< FlowHeater gets AutoInc of 6
Table = CustAddress
AddID CustID (Foreign Key) AddressLine1 AddressLine2
1 2 Cupertino United States
2 1 Redmond United States
3 3 Silicon Valley United States
Table = CustContact
ContID CustID (Foreign Key) Name
1 1 Bill Gates
2 3 Sergey Brin
If the Customer ‘FlowHeater’ was a new customer on the READ side. How can I get the Customer.CustID value when I insert a new record into the customers table on the WRITE side?
Do you have an example you can point me too that shows how to update / insert with multiple tables on the Read AND Write side. Or can you suggest an approach to use.
Also. I have only been using FlowHeater for a few hours and it looks like it will be incredibly useful and certainly has a beautifully presented user interface.
Thank you for your time.
John
Request received by Email
I need to update an Access Database from another Access Database – both DB’s have identical schemas.
Imagine on the READ side
Table = Customer
CustID CustName
1 Microsoft
2 Apple
3 FlowHeater <<<<<<< A NEW CUSTOMER ON THE READ SIDE
Table = CustAddress
AddID CustID (Foreign Key) AddressLine1 AddressLine2
1 2 Somewhere United States
2 1 Redmond United States
3 3 Bischberg Germany
Table = CustContact
ContID CustID (Foreign Key) Name
1 1 Bill Gates
2 3 Robert Stark
And on the WRITE Side …
Table = Customer
CustID CustName
1 Microsoft
2 Apple
3 Google <<<<<<< CustID 3 – 5 have already been used on the WRITE side
4 …..
5 ……
6 FlowHeater <<<<<<< FlowHeater gets AutoInc of 6
Table = CustAddress
AddID CustID (Foreign Key) AddressLine1 AddressLine2
1 2 Cupertino United States
2 1 Redmond United States
3 3 Silicon Valley United States
Table = CustContact
ContID CustID (Foreign Key) Name
1 1 Bill Gates
2 3 Sergey Brin
If the Customer ‘FlowHeater’ was a new customer on the READ side. How can I get the Customer.CustID value when I insert a new record into the customers table on the WRITE side?
Do you have an example you can point me too that shows how to update / insert with multiple tables on the Read AND Write side. Or can you suggest an approach to use.
Also. I have only been using FlowHeater for a few hours and it looks like it will be incredibly useful and certainly has a beautifully presented user interface.
Thank you for your time.
John
Request received by Email
Best wishes
Robert Stark
Did this answer your question? We would be grateful if you provide a brief comment as feedback. It may also help others who may have encountered a similar problem.
Last edit: 8 years 4 months ago by FlowHeater-Team.
Please Log in or Create an account to join the conversation.
- FlowHeater-Team
- Topic Author
- Offline
- Admin
8 years 4 months ago #2741
by FlowHeater-Team
Best wishes
Robert Stark
Did this answer your question? We would be grateful if you provide a brief comment as feedback. It may also help others who may have encountered a similar problem.
Replied by FlowHeater-Team on topic Master Detail example
Hi John,
To obtain values from MASTER table fields you have to use the FlowHeater default value property for this field like the screenshot below.
Here you can choice all fields from the MASTER table, or enter a custom value of course. In case the MASTER field is an “auto increment” field FlowHeater knows the new ID and use the right one.
There´s just one problem. To detect whether an insert or update should perform you need another criteria instead of “CustID” in the Master table! In the screenshot I switched the Primary Key manualy from “CustID” to “CustName”.
To obtain values from MASTER table fields you have to use the FlowHeater default value property for this field like the screenshot below.
Here you can choice all fields from the MASTER table, or enter a custom value of course. In case the MASTER field is an “auto increment” field FlowHeater knows the new ID and use the right one.
There´s just one problem. To detect whether an insert or update should perform you need another criteria instead of “CustID” in the Master table! In the screenshot I switched the Primary Key manualy from “CustID” to “CustName”.
Best wishes
Robert Stark
Did this answer your question? We would be grateful if you provide a brief comment as feedback. It may also help others who may have encountered a similar problem.
Attachments:
Please Log in or Create an account to join the conversation.
Time to create page: 0.261 seconds