473,386 Members | 1,817 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

What is the best way to display data from a previous form

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

Nov 23 '05 #1
2 1697
Hi,

"dbuchanan" <db*********@hotmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
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.
Keep in mind, if you do a join then then the view will end up in one
DataTable, you'll also have redundant information since each child row also
contains the parent row data.

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.
If you are planning on closing Form1, then you could copy the parent DataRow
while passing it to Form2 before showing it. Then you fill the child
DataTable by a simple stored procedure.

Or just could pass Form1's DataSet to Form2 if it contains a parent
DataTable with one DataRow and an empty child DataTable.

HTH,
Geetings


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

Nov 23 '05 #2
I can see that you are using .Net and VB..

1- you can pass the Datarow from Form1 to Form2 and so on if u need to pass
data for more forms..

2- I better recommend you use Microsoft User Interface Process (UIP)
Application Block.
http://msdn.microsoft.com/library/en...html/uipab.asp
"dbuchanan" <db*********@hotmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
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

Nov 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: news | last post by:
You'd think it'd be easier to find the answer to this question. Did a search, and all I can find is people asking why something's not working and people replying it's because register_globals is...
125
by: Sarah Tanembaum | last post by:
Beside its an opensource and supported by community, what's the fundamental differences between PostgreSQL and those high-price commercial database (and some are bloated such as Oracle) from...
6
by: Hamed | last post by:
Hello I have employed as a developer in a software company that its team uses FoxPro / VB 6.0 / VC++ 6.0 as the developing tools and newly is going to migrate to VS.NET. There is a project...
2
by: Tony Schoeffler | last post by:
I have a data entry form used for adding records tied to a particular checklist number. I currently have to enter the checklist number on each new data entry form. It would be desirable to have...
1
by: huela | last post by:
Somehow i have to display the recordset in unbound form When i use the following display the data in recordset to unbound form. I have a question: i can only display the last record data, all...
18
by: Alpha | last post by:
Hi, I'm working on a Windows applicaton with VS 2003 on windows 2000. I have a listbox that I have binded to a dataset table, "source" which has 3 columns. I would like to display 2 of those...
4
by: T.Jackson | last post by:
Hi guys, I want to display the data of a table in a datagrid in one form, & enable the user to edit the details of a particular record in another form. I want the following features, 1....
4
by: Dave | last post by:
(My apologies for posting this on two forums. I have just found out the other one was the incorrect location) I am writing a VB.NET 2003 web application to operate on my company's intranet. It...
5
by: Rob | last post by:
I have a form where the user may see a matrix of data in a grid (populated via a dataset). If the user wishes to add a new row of data, they click a button and a new form opens where the user may...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.