By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,853 Members | 936 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,853 IT Pros & Developers. It's quick & easy.

Accessing data in multiple tables within a dataset

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.