Hi there,
I have a dataset with two tables. They both have two columns which are
related (sort of a joined key). I know how to create one relation:
ds.Relations.Ad d("myrelation ",
ds.Tables["authors"].Columns["au_id"],
ds.Tables["titles"].Columns["au_id"]);
How can I create a relation to the column "issue_numb er" in the same
relation? Or how do I approach this?
Thank you
Chris 1 5084
Depending on what you are trying to do, you can either create two separate
relations or you can use one of the DataRelation constructors that take
DataColumn arrays as parameters like this:
ds.Relations.Ad d("myrelation ", new DataColumn[] {
ds.Tables["Authors"].Columns["au_id"],
ds.Tables["Authors"].Columns["issue_numb er"] },
new DataColumn[] {
ds.Tables["Titles"].Columns["au_id"],
ds.Tables["Titles"].Columns["issue_numb er"] });
HTH
Dale Preston
MCAD, MCDBA, MCSE
"chris" <ch***@discussi ons.microsoft.c om> wrote in message
news:38******** *************** ***********@mic rosoft.com... Hi there,
I have a dataset with two tables. They both have two columns which are related (sort of a joined key). I know how to create one relation:
ds.Relations.Ad d("myrelation ", ds.Tables["authors"].Columns["au_id"], ds.Tables["titles"].Columns["au_id"]);
How can I create a relation to the column "issue_numb er" in the same relation? Or how do I approach this?
Thank you
Chris This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Julio Sarmiento |
last post by:
Can anyone help me????
I have a table that I need to get the sum of four individual fields and then
rank them from highest to lowest total. After summing up the four fields
individually and ranking them, I have to place them in a single datagrid.
Example:
Table: contains fields for Revenue, Quantity, Credit Apps, Accounts by
rep (not my table!!!)
|
by: Brian |
last post by:
I have a dataset containing 2 tables. I need to fill a datagrid using
data from both of these.
If I could create a SQL Statement to fill the datagrid, it would look
like this:
SELECT fields.fieldname, fieldvalues.value FROM fields, fieldvalues
I am having trouble finding documentation explaining how to populate
|
by: Wayne Brantley |
last post by:
I have found what appears to be an error in streaming with Datasets. It
causes an error of 'Cannot find relation 0' when recreating the dataset from
a stream.
Here is how you reproduce it.
Lets assume you have tables like this:
Customers
CustomerName: Varchar(50)
CustomerNumber: Int (Primary Key)
|
by: Peter Proost |
last post by:
Hi group,
has anyone got any suggestions fot the best way to handle this problem, I've
got 3 tables
for example table A, B, and C
table A looks like name, value
table B looks like name, value
table C looks like variablename, value, value
an example would be
|
by: Corno |
last post by:
Hi all,
If I want to provide a typed dataset from a webservice and if that dataset
has relations that are nested (isNested=True), then the relations(keyrefs)
are not available in the XSD that is offered. If I set IsNested to false or
default, then it is included in the XSD.
Is this a bug or by design?
Corno
| |
by: Robert Bravery |
last post by:
Hi all,
I have now correctly set up my dataset and two grids, so that the parent
navigates the child.
THe thing is that the child table is actually a lookup type table. It lists
billing types for the parent table, so that I just store a key in the parent
table, and the show the billing type description from the child
I need to set this up in one grid. I have played arround with the tables and
columns collection in the ID, but cant seem to...
|
by: Ambica Jain |
last post by:
I have a data grid called Files, which has some columns like FileName, Col1,
Col2, ... , Col8. Then i have a combobox which allows user to select from
Col1 to Col8 and based on this selection, i generate a report from data in
grid Files.
It displays like (e.g. is Col1 is selected):
Col1 Count
----------------------
Val1 x
Val2 y
.....
|
by: ~J~ |
last post by:
Hi,
I really hope someone can help me out here.
In relation to this thread ( http://www.thescripts.com/forum/thread349557.html ) I'm having a similar issue and getting nowhere fast!
In a nutshell I have a MDI Container which can load up several forms.
Upon loading of a form, I want this form to either access or load a dataset and populate controls that have been bound to various fields of the dataset.
|
by: Andrea |
last post by:
I have a data structure composed with a dataset with multiple tables
connected through relationship. I'm using different table adapters of the
dataset for load table, but when i use the select method on master table
,data store in the other table are not filter.
I think that when there are relation with table a filter apply on table have
effect on the relate table drive by relation.
Any suggestions?
Regards
Andrea
|
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...
|
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: 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...
|
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...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
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: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |