473,513 Members | 2,448 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Accessing data in multiple tables within a dataset

Good Monday Morning:

I am at a dead stop and I am hoping some other developers out there can help
me out. I have built a dataset that first contains a table populated from
SQL Server then I am adding another table that is built from the same Query
and data from active directory. I have built a parent/child relationship and
see all the data under my locals when debugging. Where I am having the
problem is displaying the data from the second table using data binding
expressions.

<%# DataBinder.Eval(Container.DataItem, "emp_file_path") %>

I keep getting the following error:

DataBinder.Eval: 'System.Data.DataRowView' does not contain a property with
the name emp_file_path.

I am a bit lost because that data does exsist in my dataset under the table
employeePhotos:

DataTable employeePhotos = ds.Tables.Add("Employee_Photos");
employeePhotos.Columns.Add("emp_photos_ID", typeof(Int32));
employeePhotos.Columns.Add("emp_LAN_ID", typeof(String));
employeePhotos.Columns.Add("emp_file_path", typeof(String));

I guess the true question is how do I access data in different tables using
data expressions?
Nov 17 '05 #1
1 2435
Moojjoo,

I'm not sure, but isn't the container accessing the parent, and not the
child? You would need to use the data relation binding to the child and
then access the field through there.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Moojjoo" <Mo*****@discussions.microsoft.com> wrote in message
news:BA**********************************@microsof t.com...
Good Monday Morning:

I am at a dead stop and I am hoping some other developers out there can
help
me out. I have built a dataset that first contains a table populated from
SQL Server then I am adding another table that is built from the same
Query
and data from active directory. I have built a parent/child relationship
and
see all the data under my locals when debugging. Where I am having the
problem is displaying the data from the second table using data binding
expressions.

<%# DataBinder.Eval(Container.DataItem, "emp_file_path") %>

I keep getting the following error:

DataBinder.Eval: 'System.Data.DataRowView' does not contain a property
with
the name emp_file_path.

I am a bit lost because that data does exsist in my dataset under the
table
employeePhotos:

DataTable employeePhotos = ds.Tables.Add("Employee_Photos");
employeePhotos.Columns.Add("emp_photos_ID", typeof(Int32));
employeePhotos.Columns.Add("emp_LAN_ID", typeof(String));
employeePhotos.Columns.Add("emp_file_path", typeof(String));

I guess the true question is how do I access data in different tables
using
data expressions?

Nov 17 '05 #2

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

Similar topics

2
2234
by: George Grodentzik | last post by:
I created a typed dataset from which I am trying to access the data. When I use the following code to access a row string name =dataset.person.firstName I receive an error...
3
4305
by: prodirect | last post by:
Hi all, I hope someone can help me. I've recently created a database and wanted to put it up on an ftp sight so that multiple people could access the same tables at the same time from different...
2
1570
by: KimD | last post by:
I'm filling a dataset with the return of a stored procedure. The dataset contains a number of tables which I am naming within the stored procedure, however when I try to access the tables using the...
2
1448
by: James Zhuo | last post by:
Accessing Items in a Collection works with the as suggested by Kevin and Chris (thx) But when i tried to use the same technic with databinding within the aspx file, it doesn't seem to work. This...
5
1948
by: jqpdev | last post by:
Hello all... I'm coming from a Borland Delphi background. Delphi has a specific component called a Data Module. In the designer the Data Module behaves like a windows form. A developer can...
4
1418
by: Mervin Williams | last post by:
I am building a web application that will have a single form that will be populated with data from 8-10 tables. The easiest way to implement the data tier would be to use DataSets and Data...
5
2437
by: Rick | last post by:
The data adapter wizard allows you to add more than one table, but that doesn't seem to work right when setting up a dataset. Some of the documentation I have read states that only one table...
3
1695
by: Aaron | last post by:
Hi, It is possible to establish relationships between tables within a dataset and this allows some useful features. For example, given a row from a table you can use GetParentRow,...
4
16714
by: michael sorens | last post by:
I have successfully bound an XmlDocument to a DataGridView but all fields seem to be strings. I want to retrofit appropriate datatypes on some of the fields. Let me take this in 2 parts. Part...
0
7265
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,...
0
7171
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...
0
7388
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,...
1
7111
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...
0
7539
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...
0
5692
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,...
0
4751
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...
0
3228
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
807
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.