473,385 Members | 1,873 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,385 software developers and data experts.

Multiple data-table display in data control

I have an application with a list of questions, which are associated with
answers by a questId in a one-to-one relationship. The questions may come
from an XML file or a SQL Server database. The answers data will always come
from a SQL Server database. I am trying to use a DataList (preferably) or
Repeater to display the questions and update the answers.

I am using .Net 1.1. I have created a DataSet with separate tables for
questions and answers, and explicitly created the QuestAnswer relationship.
I have data-bound the DataList to the DataSet (not the individual tables).
The question detail displays, but the answers error out with no-such-column.

I have found the hierarchical-nested-DataList solution, but it seems
needlessly complex for a one-to-one relationship. Since the questions and
answers may come from different sources, I do not want to combine them.

Can anyone recommend a simple way to get both tables in the DataSet to
display in my data control? Or what am I missing?

Nov 19 '05 #1
2 1916
The DataSet can't do implict joins, so there's no way to have it return you
a single table with the join. You'd have to do that back in your database
and load those results into a single table. The other thing is that you can
manually navigate the relationships via DataRow.GetChildRows (but it sounds
like you've been doing this).

-Brock
DevelopMentor
http://staff.develop.com/ballen
I have an application with a list of questions, which are associated
with answers by a questId in a one-to-one relationship. The questions
may come from an XML file or a SQL Server database. The answers data
will always come from a SQL Server database. I am trying to use a
DataList (preferably) or Repeater to display the questions and update
the answers.

I am using .Net 1.1. I have created a DataSet with separate tables
for questions and answers, and explicitly created the QuestAnswer
relationship. I have data-bound the DataList to the DataSet (not the
individual tables). The question detail displays, but the answers
error out with no-such-column.

I have found the hierarchical-nested-DataList solution, but it seems
needlessly complex for a one-to-one relationship. Since the questions
and answers may come from different sources, I do not want to combine
them.

Can anyone recommend a simple way to get both tables in the DataSet to
display in my data control? Or what am I missing?


Nov 19 '05 #2
I was afraid of that. I was hoping to be able to keep the questions part in
an XML file, but if I have to load it into the database to make this work
I'll do that.

Alternatively, do you think it would be more difficult would it be to
retrieve the answer data from the database into an XML document and merge it
with the questions XML? (I am still trying to figure out the best ways to do
things in .NET.)

"Brock Allen" wrote:
The DataSet can't do implict joins, so there's no way to have it return you
a single table with the join. You'd have to do that back in your database
and load those results into a single table. The other thing is that you can
manually navigate the relationships via DataRow.GetChildRows (but it sounds
like you've been doing this).

-Brock
DevelopMentor
http://staff.develop.com/ballen
I have an application with a list of questions, which are associated
with answers by a questId in a one-to-one relationship. The questions
may come from an XML file or a SQL Server database. The answers data
will always come from a SQL Server database. I am trying to use a
DataList (preferably) or Repeater to display the questions and update
the answers.

I am using .Net 1.1. I have created a DataSet with separate tables
for questions and answers, and explicitly created the QuestAnswer
relationship. I have data-bound the DataList to the DataSet (not the
individual tables). The question detail displays, but the answers
error out with no-such-column.

I have found the hierarchical-nested-DataList solution, but it seems
needlessly complex for a one-to-one relationship. Since the questions
and answers may come from different sources, I do not want to combine
them.

Can anyone recommend a simple way to get both tables in the DataSet to
display in my data control? Or what am I missing?


Nov 19 '05 #3

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

Similar topics

13
by: jing_li | last post by:
Hi, you all, I am a newbee for php and I need your help. One of my coworker and I are both developing a webpage for our project using php. We have a copy of the same files in different location...
6
by: Rolf Wester | last post by:
Hi, I have a form with a select element with multiple="true". When using the GET method (I suppose the same happens with the POST method) I can seen that the form sends channels=CH1&channels=CH2...
6
by: x. zhang | last post by:
Hi Guys, We know that we can use <input type=file ...> to upload one file per time to the server. My question is if there are some way to upload multiple files per time to the server. (Of...
5
by: Morgan Cheng | last post by:
It seems no pattern defined by GoF takes advantage of multiple inheritance. I am wondering if there is a situation where multiple inheritance is a necessary solution. When coding in C++, should...
22
by: Matthew Louden | last post by:
I want to know why C# doesnt support multiple inheritance? But why we can inherit multiple interfaces instead? I know this is the rule, but I dont understand why. Can anyone give me some concrete...
5
by: Neelesh Bodas | last post by:
This might be slightly off-topic. Many books on C++ consider multiple inheritence as an "advanced" concept. Bruce Eckel says in TICPP, volume 2 that "there was (and still is) a lot of...
2
by: areef.islam | last post by:
Hi, I am kinda new to javascript and I am having this problem with selecting multiple options from a select tag. Hope someone can help me out here. here is my code...
47
by: Mark | last post by:
why doesn't .NET support multiple inheritance? I think it's so silly! Cheers, Mark
1
by: abhishekhs | last post by:
Hi all I have more than one multiple select lists in a page. Something like this <tr> <td> <select NAME="StrainList" ID="StrainList" SIZE="5" multiple="multiple" style="width: 150px"> <?...
35
by: keerthyragavendran | last post by:
hi i'm downloading a single file using multiple threads... how can i specify a particular range of bytes alone from a single large file... for example say if i need only bytes ranging from...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...

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.