D
dbuchanan
Hello,
Windows forms & database
What are the considerations when choosing how to display reference
information from the calling form? What is recommended?
Table1 is the parent of Table2.
Form1 allows data entry into Table1.
Form2 allows data entry into Table2.
Form1 (the parent) opens Form2 (the child)
I need to display six fields from the parent table or form.
I see my options as...
1.) Populate the child form from a stored procedure that uses a SQL
Server View that contains a relationship between the two tables. Supply
the PK of the parent as the parameter for the stored procedure used to
populate the child.
2.) Open the child form as ShowDialog from Form1 and hide rather than
close Form1. Open Form2 by calling a simple stored procedure that
reference only the child table supply the PK of the parent as the
parameter to filter the child table. Get the six reference fields
through the use of public fields or public properties.
There are other options but I believe the two above are better. Which
is the best and what are the considerations in choosing.
I favor #1 but have not worked with views and have reservations about
how to proceed.
Thank you,
dbuchanan
Windows forms & database
What are the considerations when choosing how to display reference
information from the calling form? What is recommended?
Table1 is the parent of Table2.
Form1 allows data entry into Table1.
Form2 allows data entry into Table2.
Form1 (the parent) opens Form2 (the child)
I need to display six fields from the parent table or form.
I see my options as...
1.) Populate the child form from a stored procedure that uses a SQL
Server View that contains a relationship between the two tables. Supply
the PK of the parent as the parameter for the stored procedure used to
populate the child.
2.) Open the child form as ShowDialog from Form1 and hide rather than
close Form1. Open Form2 by calling a simple stored procedure that
reference only the child table supply the PK of the parent as the
parameter to filter the child table. Get the six reference fields
through the use of public fields or public properties.
There are other options but I believe the two above are better. Which
is the best and what are the considerations in choosing.
I favor #1 but have not worked with views and have reservations about
how to proceed.
Thank you,
dbuchanan