473,795 Members | 2,865 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

two datasets (Master-detail) problem

I got an invheader and invdetail in one datasetl with the foreign key to
link up.
It display in two separate datagrid, now If i only want to insert one
record in invheader, as I process daInv.update()
It warns me that I need to fill invdetail also...
Do I need to create another dataadaptor .dataset for invheader again ??

Thanks
Nov 20 '05 #1
4 1111
Agnes,

Relation questions are always difficult to answer because we do not know on
what places you have set all the relations and explaining it is almost
impossible mostly.

However when you have used the commandbuilder, than probably two
dataadapters is the most simple to use in this kind of operations, otherwise
you have to build the dataadatapter everytime as new, what would mean as
well minimal two different dataadapters. However it depends very much on
your programlogic how you do it.

I hope this helps?

Cor
I got an invheader and invdetail in one datasetl with the foreign key to
link up.
It display in two separate datagrid, now If i only want to insert one
record in invheader, as I process daInv.update()
It warns me that I need to fill invdetail also...
Do I need to create another dataadaptor .dataset for invheader again ??

Thanks

Nov 20 '05 #2
I should ask my problem in another way. I got serveral textbox, and one
button .As the user input the data and press button, the data should be
displayed in the datagrid.
However, (I check the database, the records is really inserted. but the
datagird got nothing change in run-time)
I did fill(dsInvoice) again , and dgInvoice.table styles.clear() , and then
new the tablestyles again.
But it doesn't help ~~~
"Cor Ligthert" <no**********@p lanet.nl> ¦b¶l¥ó
news:uv******** ******@tk2msftn gp13.phx.gbl ¤¤¼¶¼g...
Agnes,

Relation questions are always difficult to answer because we do not know on what places you have set all the relations and explaining it is almost
impossible mostly.

However when you have used the commandbuilder, than probably two
dataadapters is the most simple to use in this kind of operations, otherwise you have to build the dataadatapter everytime as new, what would mean as
well minimal two different dataadapters. However it depends very much on
your programlogic how you do it.

I hope this helps?

Cor
I got an invheader and invdetail in one datasetl with the foreign key to
link up.
It display in two separate datagrid, now If i only want to insert one
record in invheader, as I process daInv.update()
It warns me that I need to fill invdetail also...
Do I need to create another dataadaptor .dataset for invheader again ??

Thanks


Nov 20 '05 #3
I think I am too tired .... and did something wrong about my code . I know
where is my problem
Please ignore the question ~~
"Agnes" <ag***@dynamict ech.com.hk> ¦b¶l¥ó
news:O5******** *****@TK2MSFTNG P12.phx.gbl ¤¤¼¶¼g...
I should ask my problem in another way. I got serveral textbox, and one
button .As the user input the data and press button, the data should be
displayed in the datagrid.
However, (I check the database, the records is really inserted. but the
datagird got nothing change in run-time)
I did fill(dsInvoice) again , and dgInvoice.table styles.clear() , and then
new the tablestyles again.
But it doesn't help ~~~
"Cor Ligthert" <no**********@p lanet.nl> ¦b¶l¥ó
news:uv******** ******@tk2msftn gp13.phx.gbl ¤¤¼¶¼g...
Agnes,

Relation questions are always difficult to answer because we do not know

on
what places you have set all the relations and explaining it is almost
impossible mostly.

However when you have used the commandbuilder, than probably two
dataadapters is the most simple to use in this kind of operations,

otherwise
you have to build the dataadatapter everytime as new, what would mean as
well minimal two different dataadapters. However it depends very much on
your programlogic how you do it.

I hope this helps?

Cor
I got an invheader and invdetail in one datasetl with the foreign key to link up.
It display in two separate datagrid, now If i only want to insert one
record in invheader, as I process daInv.update()
It warns me that I need to fill invdetail also...
Do I need to create another dataadaptor .dataset for invheader again ??
Thanks



Nov 20 '05 #4
OK can happen to everybody.

:-)

Cor
I think I am too tired .... and did something wrong about my code . I know
where is my problem
Please ignore the question ~~

Nov 20 '05 #5

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

Similar topics

1
3171
by: Jorl Shefner | last post by:
I have a problem that I run into a lot with the 'legend' command's default behavior. I've found a work-around but I wonder if there's a better way. For a simple example, take the following: ________________________________ x= a= b=
1
2106
by: Steven Blair | last post by:
Hi, Here is a short decsription of my problem. I have written a dll for Database accessing. I have one method which can return a Dataset and another method which takes a Dataset and upates a Database. (Disconnected Datasets). The problem I have is a new SqlAdapter is required before updating the Database: Therefore, to allow the update I have to do the following:
4
4485
by: Girish | last post by:
Im trying to create a grid within a grid programmatically. Ive been successful in doing this but I need the embedded grid to fire its ItemDataBound event so I can handle it. The event does not seem to fire for some reason. The code is below. Look towards the end of the CustomerDataGrid_OnItemDataBound(object sender, DataGridItemEventArgs e) method. This is where I register the event and place the programmatically created grid into the...
7
3346
by: Girish | last post by:
OK.. phew. Playing with data grids for the past few days has been fun and a huge learning experience.. My problem. I have a requirement to display a gird with a gird. Within the embedded grid, theres a requirement to show a drop down menu list (this is a control I downloaded online) in one of the columns. For the purposes of this question, Ive implemented the drop down menu as a drop down list instead. Ive got all this working at this...
2
1998
by: Ken C | last post by:
I've setup a Master detail table from a typed dataset on 2 different data grid The first one I bind it with the Master data table name The second data set I bind it with the MasterDetail Relation name so that I can obtain a "Detail Auto change" effect when current master record is moving around, which is suggested on syncfusion FA http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp#q780 But the problem is when I try to update a new...
1
1275
by: Engineerik | last post by:
dfjhsqd asked this earlier in the week and I have the same question. How can I apply a filter to the Master table when using two datagrids in a MasterDetail relationship?
5
6313
by: JC Voon | last post by:
Hi: I have two combo boxes on screen that when one's selection is change the other's items will be updated to reflect the change dtMaster = .... ds.Tables.Add(dtMaster)
9
2917
by: GaryDean | last post by:
We have been noticing that questions on vs.2005/2.0 don't appear to get much in answers so I'm reposting some questions posted by some of the programmers here in our organization that never got answered... There are articles on the new TableAdapters where it says that a key new advantage is that a single TableAdapter, which can have multiple queries, can be used on multiple forms. Now that was in an article on using TableAdapters with...
0
1222
by: S.Tedeschi | last post by:
Hi all; as posted some days ago, I'm converting an on-line app; I used to heavily rely on strongly-typed DataSets directly dropped onto pages, and so viewed by code(-behind) as well. In the next two weeks I discovered that such objects are no more directly usable in pages, namely in DataGrid which don't see them any more. Even if rebuilt in Component Designer, and so visible in code, DataSets are invisible in Page Designer, so now it's...
12
3605
by: BillE | last post by:
I'm trying to decide if it is better to use typed datasets or business objects, so I would appreciate any thoughts from someone with more experience. When I use a business object to populate a gridview, for example, I loop through a datareader, populating an array list with instances of a custom class in the middle tier, and then send the array list up to the presentation layer and bind the gridview to it. If I use a typed dataset, I...
0
9672
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, 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...
0
10436
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10163
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,...
0
10000
tracyyun
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...
0
9040
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6780
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();...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2920
bsmnconsultancy
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...

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.