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

repeater show the field data of 2 same table

i find some problem on repeater when i want to join 2 same table to 1 table
e.g.
company(id, customerid1, customerid2)
customer(id, name)
and join company to 2 customer table(customerid1=>customer.id and
customerid2=>customer.id)

when i use the code <%# DataBinder.Eval(Container.DataItem,
"customertable1.name") %>

it error and show
'System.Data.Common.DbDataRecord' does not contain a property with the name
customertable

customertable1 is the other name of customer table

and i find that it don't support table with field format for get the data

So how to show the "customer.name"?

any solution??

thx a lot
Feb 26 '06 #1
2 1471
I assume you made a query in such a way that the resulting record set is a
single table.

Try giving alias name to the columns, like

select ... customertable1.name as Customer1Name..

Eliyahu

"Bu**@ASP.net" <fng¢Ihk.com> wrote in message
news:ei*************@TK2MSFTNGP10.phx.gbl...
i find some problem on repeater when i want to join 2 same table to 1 table
e.g.
company(id, customerid1, customerid2)
customer(id, name)
and join company to 2 customer table(customerid1=>customer.id and
customerid2=>customer.id)

when i use the code <%# DataBinder.Eval(Container.DataItem,
"customertable1.name") %>

it error and show
'System.Data.Common.DbDataRecord' does not contain a property with the
name customertable

customertable1 is the other name of customer table

and i find that it don't support table with field format for get the data

So how to show the "customer.name"?

any solution??

thx a lot

Feb 26 '06 #2
it work
thx a lot
"Eliyahu Goldin" <re*************@monarchmed.com> ¼¶¼g©ó¶l¥ó·s»D:eS**************@tk2msftngp13.phx.g bl...
I assume you made a query in such a way that the resulting record set is a
single table.

Try giving alias name to the columns, like

select ... customertable1.name as Customer1Name..

Eliyahu

"Bu**@ASP.net" <fng¢Ihk.com> wrote in message
news:ei*************@TK2MSFTNGP10.phx.gbl...
i find some problem on repeater when i want to join 2 same table to 1
table
e.g.
company(id, customerid1, customerid2)
customer(id, name)
and join company to 2 customer table(customerid1=>customer.id and
customerid2=>customer.id)

when i use the code <%# DataBinder.Eval(Container.DataItem,
"customertable1.name") %>

it error and show
'System.Data.Common.DbDataRecord' does not contain a property with the
name customertable

customertable1 is the other name of customer table

and i find that it don't support table with field format for get the data

So how to show the "customer.name"?

any solution??

thx a lot


Feb 27 '06 #3

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

Similar topics

0
by: Viktor Popov | last post by:
Hi, I'm trying to do the following: I use a repeater control in ASP.NET/C# because I would like to show the content of one DataSet which is filled from SELECT QUERY. In DataSource I have the...
0
by: Jim French | last post by:
I have a page that takes a comma delimited string and needs to bind to a Repeater control. The string is split into an Array, and each value is put into a DataBase query via a For Each loop. The...
4
by: MattB | last post by:
This is just a rephrased version of a question I posted earlier. I think I'm closer now, so it seemed worthy of a new (more specific) post. In my repeater I'm dynamically creating text boxes, so...
1
by: Henry Nelson | last post by:
Hi all I'm very new to dotNet and just trying to get my head around the right way to do the thing that I would normally do in asp. In asp I would loop through a recordset and output all the...
3
by: sorCrer | last post by:
Hi All, Posted after extensive searching! I have a nested repeater control as follows: (Simplified ;-)) <table> <asp:repeater id=parent onItemDataBound=createChild> <tr><td>Level...
4
by: Marc Llenas | last post by:
Hi there, I have a repeater that returns x rows from a main table. I need to display some info stored on a secondary table that is linked to the main using a one-to-many relationship. ...
2
by: shapper | last post by:
Hello, I created a Repeater at runtime with an AccessDataSource.Everything Works fine! Now I need to use the same repeater but with a DataSource created in my VB.Net code. I created a...
11
by: JJ297 | last post by:
I want to hide the Pin field below in my repeater. How do I do this? <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1"> <ItemTemplate> <tr> <td><font...
12
by: =?Utf-8?B?Qi4gQ2hlcm5pY2s=?= | last post by:
I'm doing a web app in VB/Dot Net 2.0. I'm probably a bit rusty and I have no experience using the repeater control. I have a user control I've created with multiple properties. I've created a...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...

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.