473,756 Members | 5,850 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.Data Item, "emp_file_path" ) %>

I keep getting the following error:

DataBinder.Eval : 'System.Data.Da taRowView' 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("em p_photos_ID", typeof(Int32));
employeePhotos. Columns.Add("em p_LAN_ID", typeof(String)) ;
employeePhotos. Columns.Add("em p_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 2512
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.co m

"Moojjoo" <Mo*****@discus sions.microsoft .com> wrote in message
news:BA******** *************** ***********@mic rosoft.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.Data Item, "emp_file_path" ) %>

I keep getting the following error:

DataBinder.Eval : 'System.Data.Da taRowView' 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("em p_photos_ID", typeof(Int32));
employeePhotos. Columns.Add("em p_LAN_ID", typeof(String)) ;
employeePhotos. Columns.Add("em p_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
2257
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 System.IndexOutOfRangeException as if there are no rows. Yet when I dump the data to a file I receive (sample of file) <?xml version="1.0" standalone="yes"?><Dataset1 xmlns="http://tempuri.org/Dataset1.xsd"><Table><accountNo>1</accountNo><firstName>John ...
3
4319
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 geographical locations. I have been completely unsucessful in acheiving this goal so far however. Things I have tried: Create a shortcut to ftp sight via browser then tried to map local drive to
2
1584
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 names assigned I get errors. It doesn't seem to be assigning the names correctly within the stored procedure - instead it uses default names: Table, Table1 etc. e.g. Accessing using aDataSet.Tables
2
1458
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 is the aspx part that i am talking about <asp:DataGrid id="dgThreads" runat="server" AutoGenerateColumns="False"> <Columns> <asp:TemplateColumn HeaderText="Databases"> <ItemTemplate>
5
1963
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 drop non-visual (controls) on the data module surface and wire them up and create procedures, functions, event procedures. In the source file (code behind file) the Data Module is a class, and the dropped components are public properties. The...
4
1433
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 Adapters for each table. But, is that the optimal approach? How do I optimize the back-end data retrieval and corresponding updates (inserts, updates, and deletes) within the .NET Framework? Thanks in advance,
5
2461
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 should be selected per data adapter, and then you use a DataRelation object to pull join them together. Okay, if that's the case then fine, but why would the data adapter allow you to add more than one table if this is not how it is supposed to work....
3
1705
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, GetParentRows, GetChildRows. However, I don't see a good way to represent data from multiple dataset tables within a single datagrid (although I can think of at least one bad way). For example, if you have a Invoice table which instead of having an company...
4
16739
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 I: I found the ValueType field, leading me to believe that I could say dataGridView.Columns.ValueType = typeof(Double); dataGridView.Columns.ValueType = typeof(Integer); etc.
0
9454
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9271
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
10028
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, 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...
0
9868
jinu1996
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...
1
9836
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9707
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...
1
7242
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...
1
3804
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
3352
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.