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 2 1711
Hi,
"dbuchanan" <db*********@ho tmail.com> wrote in message
news:11******** **************@ g43g2000cwa.goo glegroups.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
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*********@ho tmail.com> wrote in message
news:11******** **************@ g43g2000cwa.goo glegroups.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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 off.
I found one person said: "The change is for the better since
register_global turned to on had some grim security implications." but
no mentioning of what those are!
I'm working on a server now, with a couple hundred PHP pages someone
has...
|
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 software giant such as Microsoft SQL
Server, Oracle, and Sybase?
Is PostgreSQL reliable enough to be used for high-end commercial
application? Thanks
|
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 modified that is to upgrade a big,
more than 100,000 lines DOS based program developed by FoxPro 2.x to .NET
platform. The design is as previous and the implementation will be
reprogrammed. As a duty in my job I should find an answer about the
|
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 the new data
entry form display the checklist number from the previous record. Is
there a reasonable way to do this? Thanks in advance for any help.
Tony
|
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 previous data are
overwrittend. why i can't create the continues form or datasheet
display the data line by line.
Thanks a lot for the help
| |
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 columns, "scode" and "sname", as 1 column
(if not possible then 2 columns will be fine) in the listbox. Can the
listbox display 2 columns information from the dataset and how can I do that?
Also, I set the property of the listbox to selectionmode...
|
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. display the data in a grid in one form
2. enable editing the data for a row in another form
3. checking if changes have been made, reverting the changes, saving the
|
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 accesses data in an SQL Server database. I have developed a
couple of pages that display data successfully. However, there is one area
that I am having trouble getting a handle on, despite purchasing a couple of
Wrox books.
Up until now, I have...
|
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 enter data into each
textbox, then click the add button when finished. At this point a stored
procedure is run which inserts the new row into the database (not the
dataset), given that the row is not a duplicate and the contents of each
text...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |