473,804 Members | 3,182 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

'System.Data.Da taRowView' does not contain a property ......

I am trying to bind two tables to two different list boxes

Ther tables are working as I use them on another page wth no problems

The code is as follows...

private void Page_Load(objec t sender, System.EventArg s e

oleDbDataAdapte r2.Fill( dataSet1)
oleDbDataAdapte r4.Fill( dataSet1)

listVersion.Dat aSource = dataSet1
listVersion.Dat aTextField = "version"
listVersion.Dat aValueField = "version"
listVersion.Dat aBind()

listMerchant.Da taSource = dataSet1
listMerchant.Da taTextField = "merchant"
listMerchant.Da taValueField = "merchant"
listMerchant.Da taBind()
the merchant one works fine, the versions one returns..

DataBinder.Eval : 'System.Data.Da taRowView' does not contain a property with the name version.

both adapters are created the same way and work fine on another page (the versions table is working as expected). I don't think its a problem with the db. If I remove the listVersion.Bin d(); it will compile and run loading only the merchants list of course..

I know this is probably not enough info, but maybe other people have seen this and can point to the right direction

thanks so much !!
Nov 18 '05 #1
2 2216
Hi,

the data is in two separate tables in the DataSet. You need to distinguish
the table to use when databinding. For example:

listVersion.Dat aSource = dataSet1.Tables[0];
....
listMerchant.Da taSource = dataSet1.Tables[1];

not sure which way it should be as I know nothing about your data/database.
You can give tables a name when calling Fill method and access table with
that name via DataSet's Tables property.

oleDbDataAdapte r2.Fill( dataSet1,"Table 1");
oleDbDataAdapte r4.Fill( dataSet1,"Table 2");

and then respectively:

listVersion.Dat aSource = dataSet1.Tables["Table1"];
....
listMerchant.Da taSource = dataSet1.Tables["Table2"];

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke
"etropic" <an*******@disc ussions.microso ft.com> wrote in message
news:3B******** *************** ***********@mic rosoft.com...
I am trying to bind two tables to two different list boxes.

Ther tables are working as I use them on another page wth no problems.

The code is as follows....

private void Page_Load(objec t sender, System.EventArg s e)
{
oleDbDataAdapte r2.Fill( dataSet1);
oleDbDataAdapte r4.Fill( dataSet1);

listVersion.Dat aSource = dataSet1;
listVersion.Dat aTextField = "version";
listVersion.Dat aValueField = "version";
listVersion.Dat aBind();

listMerchant.Da taSource = dataSet1;
listMerchant.Da taTextField = "merchant";
listMerchant.Da taValueField = "merchant";
listMerchant.Da taBind();
}
the merchant one works fine, the versions one returns...

DataBinder.Eval : 'System.Data.Da taRowView' does not contain a property with the name version.
both adapters are created the same way and work fine on another page (the versions table is working as expected). I don't think its a problem with the
db. If I remove the listVersion.Bin d(); it will compile and run loading
only the merchants list of course...
I know this is probably not enough info, but maybe other people have seen this and can point to the right direction ?
thanks so much !!

Nov 18 '05 #2
great ! I will look into that

I thought though that was only true with UNTyped dataSet, and I am using a Typed DataSet

thanks again !
Nov 18 '05 #3

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

Similar topics

1
6793
by: GeraldBauer | last post by:
I am experiencing some weird behaviors with the listbox and dataview. Here is a boiled down code snippet of what I am trying to do. <snippet> string MENUID = "MenuId" , ITEM = "Item" , MENU_ENTRY_ID = "MenuEntryId"; private void populateMenu() {
4
7300
by: emma middlebrook | last post by:
Hi Straight to the point - I don't understand why System.Array derives from IList (given the methods/properties actually on IList). When designing an interface you specify a contract. Deriving from an interface and only implementing some of it means something is wrong: either the interface specification is wrong e.g. not minimal or the derivation is wrong e.g. the type can't actually honour this contract.
3
6108
by: John Hoge | last post by:
I have a datagrid that needs to display information from a related table, and I have use a template column to pass the Container.DataItem object to a method called ShowPub as follows: <asp:TemplateColumn HeaderText="Publisher"> <ItemTemplate> <asp:Label Runat="server" Text='<%#ShowPub(Container.DataItem)%>' /> </ItemTemplate> </asp:TemplateColumn>
5
5174
by: karim | last post by:
I am getting the error below when I try to use DataRowView in my aspx page. I am using the System.Data in my code behind. I even tried importing system.Data in the aspx. I have to qualify it with System.Data to get it going. Why is that? Error Message: The type or namespace name 'DataRowView' could not be found (are you missing a using directive or an assembly reference?) Karim
0
1742
by: MS | last post by:
I am very new to asp.net. Please help me in resolving the error: DataBinder.Eval: 'System.Data.DataRowView' does not contain a property with the name RENEW_EXIST. I get the above error with the following code in aspx page <asp:Label ID="lblRenewExist" Visible="False" Runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "RENEW_EXIST") %>' /> If I change DataBinder.Eval(Container.DataItem, "RENEW_EXIST") to...
2
13598
by: Georg Mayer | last post by:
Hi, I am trying to display data from a DataSet in a Repeater Control. My item-template (just an example) is like this: <ItemTemplate> <td> <asp:Label Runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "item.Name") %>' ></asp:Label> </ItemTemplate> The problem, in my opinion, is that in my DataSet I am using alias
0
1158
by: Michał Januszczyk | last post by:
Is it possible somehow to retreive {data Key Value} based on clicked {datagrid item index} ? Now i'm trying to do this in the following way, but with no effect. Now, Instead of getting value according to specified sort key i get wrong data HandleInnerDGRControlItemClick(Object sender, DataGridCommandEventArgs args) { int clickedIndex = args.Item.ItemIndex;
3
8703
by: John | last post by:
I'm getting this error when i'm trying to databind my dataset to a dropdown: DataBinding: 'System.Data.DataRowView' does not contain a property with the name '12/12/2003' but if I do a response.write I can see the dates fine, what is causing this error? code: dYear.DataSource = dsYearofSales.Tables; string strYearofSales = dsYearofSales.Rows.tostring(); dYear.DataTextField =
2
1595
by: arupasna | last post by:
I am working with datagrid while adding new row in Datagrid getting following problem pls help me out of this problem DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'ddYearOfImprv'.
0
9708
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
10340
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...
0
10085
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...
0
9161
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, 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...
1
7623
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...
0
6857
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4302
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
3827
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2998
bsmnconsultancy
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...

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.