473,804 Members | 2,280 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Data Relation? Newbe question

I'm setting up a dataset using the GUI to have a Parent Data Table and a few
Child Data Tables.

I then have a form that uses that dataset, and I can fill the appropriate
datatables et. al., but I can't figure out how that parent/child
relationship gets enforced? It's a one to one relationship, and when I bind
a textedit to the child table row, it's not the row that matches the
relation with the parent table.

Pretend it's a Shirt

Parent Table Shirts:
Name: Polo Shirt
ColorCode: 3

Child Table Colors:
1 Red
2 Blue
3 Green
Instead of seeing "Green" on the edit form, I see "Red" as if the relation
hasn't been enforced. I'm sure I'm missing something obvious!


Feb 1 '07 #1
1 1471
I'm assuming you are using data binding?

You need to set the source of the child's field to the relation between the
two tables, not to the parent table or the child table. If you are using a
BindingSource, you need a separate one for the ChildTableColor s.

Robin S.
--------------------------------
"Ginger Estherskip" <ba****@127.0.0 .1wrote in message
news:eN******** ******@TK2MSFTN GP04.phx.gbl...
I'm setting up a dataset using the GUI to have a Parent Data Table and a
few Child Data Tables.

I then have a form that uses that dataset, and I can fill the appropriate
datatables et. al., but I can't figure out how that parent/child
relationship gets enforced? It's a one to one relationship, and when I
bind a textedit to the child table row, it's not the row that matches the
relation with the parent table.

Pretend it's a Shirt

Parent Table Shirts:
Name: Polo Shirt
ColorCode: 3

Child Table Colors:
1 Red
2 Blue
3 Green
Instead of seeing "Green" on the edit form, I see "Red" as if the
relation hasn't been enforced. I'm sure I'm missing something obvious!


Feb 1 '07 #2

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

Similar topics

4
1531
by: Frustrated Newbe | last post by:
Hi, I would appreciate your opinion on the following issue. Suppose there is a windows (not web!) application that uses the data stored on an SQL server. There can be more than one concurrent user of the app, so the concurrent database update is an issue. There are also plenty of forms that when displayed have some or all controls pre-filled with data, which is stored in a number of different tables in the database. Question: what...
4
3167
by: teddysnips | last post by:
This is a rather abstract question about data design, but I ask it here because a) the database is SQL Server, and b) you're such a learned bunch! Let's assume the classic relation of Customers and Orders, where an Order may reference a single Customer. If I was designing such a relation from scratch, I would create the Customer table with an Identity column and call it CustomerID. The Order table would contain a column called...
9
6694
by: Yaro | last post by:
Hello DB2/NT 8.1.3 Sorry for stupid questions. I am newbe in DB2. 1. How can I read *.sql script (with table and function definitions) into a database? Tool, command... 2. In Project Center I created funcion CREATE FUNCTION DB2ADMIN.xxx( )
11
2427
by: deko | last post by:
If I release a new version of my mbd (in mde format) and users want to upgrade - how do they migrate their data? For example, if the original was released as data1.mde and then I release data2.mde (same table/data structures - just revised VBA code with perhaps a new/updated form or two), what's the best way for users to get their data into the new data2.mde? I'm thinking I could use a query - something like:
0
1187
by: Joe Van Meer | last post by:
Hi all, I have a question regarding data relations within a data set. Say I have 3 tables named CLIENT, BOOKING and EMPLOYEE and I wanted to relate the first two tables (CLIENT AND BOOKING) via a clientid and relate the second set of tables (BOOKING AND EMPLOYEE) using an employeeid. My problem arises when there a re no records in one of the tables in either data relation. What is the best way to handle this, check the number of...
1
2026
by: Jim | last post by:
I have created a windows form that contains several tab pages which contain a panels. On a tab page I am trying to dynamically create a series of buttons in that pages panel. I am failing because I can not find the proper way to point to the specific tab page and its panel when creating the buttons. I also need to dynamically change the background color property of each button as it is clicked.
6
1869
by: Peter W Johnson | last post by:
Hi Guys, I am trying to display a datagrid containing two related datasets. I have filled and related them on MemberID with the following code:- Dim myconnection As Odbc.OdbcConnection
5
6459
by: sutphinwb | last post by:
Hi - This could be a simple question. When I relate two tables in a datasetet, how do I get that relation to show up in a GridView? The only way I've done it, is to create a separate table in the dataset with a join query for the GetData() select method. I use ObjectDataStore to couple the GridView with the table adapter on the dataset. If I point the ODS at the child table, the GridView will bind to the "normal" select and I end up...
17
2725
by: Eric_Dexter | last post by:
def simplecsdtoorc(filename): file = open(filename,"r") alllines = file.read_until("</CsInstruments>") pattern1 = re.compile("</") orcfilename = filename + "orc" for line in alllines: if not pattern1 print >>orcfilename, line I am pretty sure my code isn't close to what I want. I need to be able
0
9594
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,...
0
10090
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
9173
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
7635
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
6863
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
5673
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4308
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
2
3832
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3001
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.